Posts

Showing posts from March, 2013

Perform the Same action multiple times with different parameters

Image
Sometimes we might want to perform the same action multiple times with different parameters. The following is a basic example of how to do this in LoadRunner. In this example we have three different Parameters {Param_1}, {Param_2} and {Param_3} as shown. The following script will perform three searches on google.co.in using above three different parameters. Action() {             int i;             char temp[10];             // Progress Through 3 Parameters stored in {Param_1}, {Param_2} and {Param_3}             for(i=1;i<4;i++) {             //stores the output like {Param_1} to variable temp                         sprintf(temp,"{Param_%d}",i ); //To print the value of temp lr_message("print %s",temp ); //Evaluate the temp and store the value in Param_value                         lr_save_string(lr_eval_string(temp), "Param_value");                         lr_start_transaction("Se

Vmstat Output explained

vmstat : vmstat is a tool in Unix/Linux which is used to Report virtual memory statistics. It shows how much virtual memory there is, how much is free and paging activity. Most important, you can observe page-ins and page-outs as they happen.   vmstat   reports   information about processes, memory, paging, block IO, traps, and cpu activity.   > vmstat procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----   r   b    swpd    free    buff   cache         si    so     bi     bo    in    cs us sy id wa st   0   0   21688 12797396 850716 15372668     0     0      3     35     0     0   1   0 99   0   0   0   0   21688 12789292 850716 15372668     0     0      0   1355   883   744   1   0 99   0   0   1   0   21688 12784648 850716 15372676     0     0      0     15 1934 1292   6   0 93   0   0   2   0   21688 12781356 850716 15372736     0     0      0     16 2222 2094   8   1 92   0   0   0   0   21688 12809992 850716 15376880     0