Thursday, August 26, 2010

Generate the Custom Graphs using LR Analysis Component

Please validate the below before confirming with the client… an interesting article to try..



__________________________________________________________________________________________________________________

Hi All,

Easy to Generate the Graphs for PerfMon/Nmon (Unix flavor Operating System) counter data: (Silk Performer – CSV to TSD option)

HP LoadRunner Analysis is a free tool right? By using LoadRunner Analysis component, we can use to generate the graph for external data file (CSV/XLS).

Usually, we are monitoring the server’s operating system and server specific counters using other 3rd party tools like PerfMon/Nmon/VMSTAT/Top commands (Due to some security reasons, we are monitoring the servers using 3rd party tools and will generate the measurements in CSV/XLS format). After completion of collecting the data (in CSV/XLS format), we need to write a macro or manually plot the graphs in Excel. Instead of drawing the graphs manually, we can use the LR analysis component effectively. We can certainly install the trial version of LoadRunner 9.x. Simply use the Import Data functionality built into Analysis…

Please find the below example.

1. Collecting performance metrics from remote Linux Operating System to get the raw metrics provided from commands like vmstat, iostat and Top to get memory, disk and cpu utilization respectively.

2. Then quickly parse that data using some custom Perl scripts to help format those results into the csv format that LoadRunner Analysis expects.

For example, vmstat info that comes in its raw format like this:


kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr m0 m1 m2 m1 in sy cs us sy id
0 0 0 40563488 10311984 4 21 1 0 0 0 0 0 0 0 0 413 280 280 0 0 99
0 0 0 31902256 1908536 1 20 0 0 0 0 0 0 0 0 0 637 793 831 1 0 99

Can be turned into LoadRunner Analysis friendly format like this:
date,time,r,b,w,swap,free,re,mf,pi,po,fr,de,sr,m0,m1,m2,m1,in,sy,cs,us,sy,id
13/4/2008,17:36:22,0,0,0,31792512,2202496,0,2,0,0,0,0,0,0,0,0,0,577,699,706,1,0,99
13/4/2008,17:36:17,0,0,0,31779792,2201592,0,2,0,0,0,0,0,0,0,0,0,568,699,695,0,0,99

Using the Import Data Tool in LR Analysis.

To use the Import Data tool:

1. Choose Tools > External Monitors > Import Data. The Import Data dialog box opens.

2. Browse the CSV file to generate the graph

3. Merge the custom graph with LR client side Running Vuser graph

4. Prepare the Analysis Report.

2 comments:

MG said...

Can you open analysis and perform this without a load runner result?
...I think not
The upshot is although its a free tool, you need a result to add the external data too i.e. you need to have controller which of course means a license.
Frustrating.

Unknown said...

Hi Rupesh,
I am trying to import a csv file into LR Analysis tool but getting incorrect file format error. I made sure that first two columns are date and time that matches with the scenario start date/time and same format as scenario but same error. I tried .xls/.csv comma separated/tab separated but not able to resolve this issue.
can you help?
Thanks
Nash