We have a requirement to start the vmstat on unix servers during each test execution, however the vmstat should stop after test execution. Presently we are java vuser script doing this, is there any efficient ways by which this can be done. Please share your thoughts.
Eexamine Sit SiteScope and the stats which are collected there. SiteScope uses OS native tools, such as VMSTAT to collect stats while the test is executing. And, as a plus, with versions 8.x and above you get 500 SiteScope points shipped in the box to collect stats while the test is ongoing and to integrate those stats into your LoadRunner Results set.
you can write a shell script and capture the vmstat output to a file. Try "vmstat 1 3600", where 1 is frequnecy in seconds at which samples are to be collected and 3600 is no of such samples, here it is 1 hr.
Here are my thoughts
1. RTE Virtual User to actuall execute the vmstat command. No pacing in the script, but use the [start|end]_timer() function set combined with a sleep command to get your precise one second pacing
2. Use a shell script to output the values for VMSTAT to a format which can be imported into LoadRunner Analysis at the end of the test. Run this with the one second delay on each host you need to monitor. You will need to be sure that your clock is synced on your host along with your controller
3. Use a Winsock script to get the data from the host using one of the following
3a. Winsock with Telnet
3b. Winsock with SNMP
Your sampling rate of one second is very aggressive. There is a quantum relationship with monitors: Aggressive use of monitors can cause a distortion on the host which is being monitored as ressources are taken away from the app and devoted to reporting for the monitors. Food for thought.