Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 74944 invoked from network); 16 Dec 2010 00:54:34 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Dec 2010 00:54:34 -0000 Received: (qmail 92211 invoked by uid 500); 16 Dec 2010 00:54:34 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 92186 invoked by uid 500); 16 Dec 2010 00:54:34 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 92178 invoked by uid 99); 16 Dec 2010 00:54:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Dec 2010 00:54:34 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shettyd@gmail.com designates 209.85.214.174 as permitted sender) Received: from [209.85.214.174] (HELO mail-iw0-f174.google.com) (209.85.214.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Dec 2010 00:54:29 +0000 Received: by iwn9 with SMTP id 9so2861411iwn.33 for ; Wed, 15 Dec 2010 16:54:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=aFzlvpXQKpNcSMiu4IY27RIDhRowT+Vj+IJqUCbnStQ=; b=HKHoJsTX45MtraIzwhFtPEpDvFDE+WuM6yg3Q8OGib52Lzw5G2oj/MzLIAZf8j3yf/ jHhcFKX1S85H6b0prM9W1z0dVvfvy63j+OPRBWFtCkK7l4UUqZ9LlI7B380hVh1J2e6u KX7OWtzz/PQHKAub2Xwou8W1V8/vgiwFW0DRk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=B51A+7uuMtAf1AYDQ3JoRpHsMzn6KqprqgYKStvHfLvgNI1pTJNYMV3M4R7oo3qFit ErQb6WFWQMJwRZHPR5ZuCYT4ggNtcWn5RAqfRFeZNE26fdf4rLXoHxNM8BQ20qO9suuk 4YShCABImYWp0vk+X9GiEO1hnFBSjdGTJ8KJ4= MIME-Version: 1.0 Received: by 10.231.10.193 with SMTP id q1mr5641103ibq.53.1292460848901; Wed, 15 Dec 2010 16:54:08 -0800 (PST) Received: by 10.231.170.14 with HTTP; Wed, 15 Dec 2010 16:54:08 -0800 (PST) In-Reply-To: References: Date: Wed, 15 Dec 2010 16:54:08 -0800 Message-ID: Subject: Re: Monitoring Other Values During Test? From: Deepak Shetty To: JMeter Users List Content-Type: multipart/alternative; boundary=0022152d60cdc8f0de04977c7dda --0022152d60cdc8f0de04977c7dda Content-Type: text/plain; charset=ISO-8859-1 >I was wondering if I could somehow have something that would start some sort of logging on an external client before beginning the test The easiest (if you only have 1 threadgroup) is TestPlan (run thread groups serially) ThreadGroup1 (1 thread) +Test Action Sampler --> doesnt add spurious samples to your result ++Beanshell pre processor --> do whatever you want in java , kickoff stuff etc ThreadGroup2 (n threads, your test) ThreadGroup3 (1 thread) +Test Action Sampler ++Beanshell pre processor --> do whatever you want in java This works as long as you dont have multiple thread groups that need to execute at the same time regards deepak On Wed, Dec 15, 2010 at 12:16 PM, Josh Abts wrote: > Thanks for the advice. > > I was wondering if I could somehow have something that would start some > sort > of logging on an external client before beginning the test, then stopping > it > once the test completes. If I could write a shell script or something that > would poll every 5 seconds or something to select the values I want and log > them itself. > > The only real requirement is that it be turnkey in the sense I put stuff in > the right spots and click Go. If I have to create some graphs from a csv > or > such that isn't too big of a deal as long as I can relatively easily > compile > the results. > > Maybe I will look into firing off the JMeter test via a command line and > then before running it turn on some sort of monitoring system like cacti > and > then stop it once i hit the end of the test or a defined time frame. > > Thanks again! > josh > > On Wed, Dec 15, 2010 at 1:40 PM, Anthony Johnson wrote: > > > Hey Josh, > > I have to agree with deepak. My team had the same requirement. > > The solution we came up with was to create our own Sampler that has > > the ability to hit an SNMP interface and graph that data via jrobin. > > This was a major commitment on our part and has proven quite useful > > for our needs(I can't share with the community yet). Knowing how much > > work it was, I would recommend using an external monitoring station > > instead to capture the data. Something like this: > > > > 1. Normalize your environment and use something like Cacti to create > > beautiful graphs for all that you want to see. I see topics on Cacti > > around JMX, so I'm sure you can find an easy way to get the data you > > need into it. > > 2. At the end of the test you can use a BSH Sampler to HTTP GET all > > the graph data for the timeframe of the test. The way I would > > implement this would be a common beanshell script that can connect to > > a URL and save the graph image/data locally. Then just pass arguments > > into the script from the BSH Sampler. > > 3. Since you would need to only trigger the beanshell when your test > > is done, the test would have to be designed in way that the end can be > > known. > > > > Beanshell has a decent manual and several examples exists for Java to > > pull the data from the monitoring station to your JMeter station ( > > > > > http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html > > ). > > > > Hope this helps, > > > > Anthony > > > > > > On Wed, Dec 15, 2010 at 2:31 PM, Josh Abts > > wrote: > > > I didn't think about the simultaneous calls to JMX. > > > > > > Basically I want to be able to see values over time of various > indicators > > > that are accessible through JMX. I could graph it separately and > monitor > > > through another script, but ideally, we want this to be an all in one > > > solution. Run the test, see the results. Not have to merge 3 > different > > > graphs and csv files, etc. > > > > > > I am using the jmeter-plugins from the google projects page to graph > > > cpu/memory/disk io over time, and I would love something almost exactly > > the > > > same but graphing these certain JMX indicators. > > > > > > So far I have it working by updating the sample variables and using a > > > beanshell postprocessor in order to update the vars with the JMX > values. > > > Then we can at least access those via CSV and graph them myself. > > > > > > Thanks for the input, > > > Josh > > > > > > On Wed, Dec 15, 2010 at 1:23 PM, Deepak Shetty > > wrote: > > > > > >> Hi > > >> My 2 cents. > > >> > > >> i wouldnt do it this way. Most app servers have low impact monitoring > > tools > > >> that run within the app server that allow them to write JMX data to > > files > > >> in > > >> various combinations (especially alerting kind of JMX - notify if free > > >> connections fall to < 3 or something) so I am not really in favor of a > > one > > >> client does all solution - its easier to combine results. > > >> > > >> Also if you code this yourself from an external client then you must > > >> account > > >> for the additional load that you are putting on the server(as opposed > to > > >> the > > >> app server which will usually give you figures like expect 2% > reduction > > per > > >> 10 attributes monitored or something) . The sample variables are > > recorded > > >> per thread - why would you want to do that?. If you are running say a > > 100 > > >> threads you dont really want to make a 100 concurrent JMX calls so > you'd > > >> have to code it to say only 1 thread actually makes the call. Usually > > you > > >> want this to be interval based (monitor every x minutes or so) which > > doesnt > > >> fit into sample_variables easily. > > >> > > >> regards > > >> deepak > > >> > > >> On Wed, Dec 15, 2010 at 6:55 AM, Josh Abts > > >> wrote: > > >> > > >> > I like the idea of the sample variables. The question now is is > there > > >> any > > >> > sample code/examples of how to connect say a JMX (java management) > > value > > >> to > > >> > variable. > > >> > > > >> > My best guess would be a BeanShell sampler with some sort of custom > > Java > > >> > code, but is there a cleaner/easier way? > > >> > > > >> > On Mon, Dec 13, 2010 at 5:27 AM, sebb wrote: > > >> > > > >> > > On 10 December 2010 20:04, Josh Abts > > wrote: > > >> > > > Is it possible to monitor other values somehow during a JMeter > > test? > > >> > > > > >> > > You can record variables using: > > >> > > > > >> > > > > >> > > > >> > > > http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables > > >> > > > > >> > > So if you can get the value in a variable, you can associate if > with > > >> > > each sample. > > >> > > > > >> > > > For example I may want to graph load average over time in > > conjunction > > >> > > with > > >> > > > the test that is being run. Is it possible to do this all in a > > >> single > > >> > > > interface (JMeter) through some listener or is it only possible > if > > >> done > > >> > > > through a separate utility? Alternatively if I can access the > > value > > >> I > > >> > > want > > >> > > > through JMX, is there a way of accessing that value and graphing > > it > > >> or > > >> > > > recording it along with the thread requests? > > >> > > > > > >> > > > Basically, it would be nice if it is possible to have this be > > >> turn-key > > >> > in > > >> > > > the sense that we can do one test and have one place to record > and > > >> > > monitor > > >> > > > all the data and then break it apart ourselves if necessary. > > >> > > > > > >> > > > Thanks! > > >> > > > > > >> > > > -- > > >> > > > Joshua Abts > > >> > > > > > >> > > > > >> > > > > --------------------------------------------------------------------- > > >> > > To unsubscribe, e-mail: > jmeter-user-unsubscribe@jakarta.apache.org > > >> > > For additional commands, e-mail: > > jmeter-user-help@jakarta.apache.org > > >> > > > > >> > > > > >> > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org > > > > > --0022152d60cdc8f0de04977c7dda--