Local Unix monitoring made possible?

Posted: May 24th, 2008 | Author: TnT Admin | Filed under: Tools | Tags: , | No Comments »

Have you ever come across an attempt to monitor Unix resources with just only rstatd? Where there are no options available to use SiteScope via telnet or SSH? Or simply because of the time factor that you must monitor the Unix resources in the load test conducted the following day?

Check out this script from Bad Penguin.co.uk. This script at it’s latest version when placed in a Unix machine, collects performance statistics at desired intervals and convert them into CSV report which can be imported to a spreadsheet, database and LoadRunner Analysis to perform analyzing work. It uses standard unix utilities (iostat, vmstat, netstat and uptime) and has been tested on Linux and Solaris systems. The usage of vmstat, netstat, iostat and uptime is far more comprehensive than those used by rstatd.

Click on the link below to get a copy of the script!

performanceMonitor.sh

The script is used in two ways. One to generate statistics and two to convert to a CSV format. The below describes the command to execute.

Generate statistics $ performanceMonitor.sh run
Convert to CSV format $ performanceMonitor.sh csv YYYYMMDD
Before you use the script to collect statistics, you will need to configure the interval between each collection. This is to change the variable SLEEP. Set it at an acceptable level, e.g. 15 to reduce the overhead generated from the execution of the commands. When you are done with exporting out to a CSV format, you can use the Analysis import feature to import this CSV file for analysis work. We used the below settings in Analysis for import this CSV files.
Fig.1: Analysis Import Settings

Take note that, after running $performanceMonitor.sh run on the command prompt, the script will run infinitely till it a manual break is issue. Therefore, you may consider writing a cron job to enhance the monitoring scheduling in the load test.

Related Posts



Leave a Reply