Performance data from vmstat
Vmstat
is a Unix command that provides CPU, memory and kernel statistics. On AIX it can also provide a time stamp to each line of data and the output can be read by pGraph.
In order to collect data, use the following syntax, where the -t flag forces a time stamp to be printed:
vmstat -t <sample time in seconds> <number of samples> > <filename>
A typical data collection lasts for 24 hours with a sampling time that depends on the type of event that the user wants to identify. The shorter the time the bigger is the file created and a more fine grained analysis can be made.
Since pGraph has no file size limitation and it enables user to have a quick look to the entire period and then zoom to a specific time period, it is suggested to collect data with a small sampling time. The real limitation can be the space available on the system for file creation. During benchmarks a 5 seconds is usual, for production systems a range from 60 seconds to 900 seconds (15 minutes) can be more appropriate.
pGraph can read in either interactive-mode and in batch mode a single file o multiple files produced by vmstat -t.
Single file
When pGraph reads a single vmstat file, it provides the GUI shown by the following figure:

The same set of information is provided in batch mode.
Since vmstat only prints the time of the sample and not the date, pGraph will always show January 1st 1970 as starting day.
Multiple files from the same host
Monitoring normally lasts for several days if it is not continuous. It is common to produce multiple vmstat files, each related to a single day. In order to read them as a whole, you should concatenate them in the right order and then read the result with pGraph. Since no date is provided by vmstat, there is way to make this process automatic. An easy way to merge is to use the cat command:
cat file1 file2 file3 > merged-file
Multiple files from multiple hosts
It is common to analyze multiple systems at a time, especially when LPARs are involved. In this case pGraph focuses on CPU performance data related to multiple hosts where each file represents a single host.
pGraph extracts CPU data from each file and creates the following performance graphs:
- Average CPU statistics (User, System, Wait, Idle) for each host.
- Physical CPU usage for each host, if it is a micro partition.
- The sum of physical CPU usage of all micro partitions, if present.