What is the VMSTAT unix command used for?
VMSTAT is a Unix based command that reports statistics about kernel threads, virtual memory, disks, traps and CPU activity. Reports generated by the vmstat command can be used to balance system load activity. These system-wide statistics (among all processors) are calculated as averages for values expressed as percentages, and as sums otherwise.
If the vmstat command is invoked without flags, the report contains a summary of the virtual memory activity since system startup. If the -f flag is specified, the vmstat command reports the number of forks since system startup. The PhysicalVolume parameter specifies the name of the physical volume.
The Interval parameter specifies the amount of time in seconds between each report. The first report contains statistics for the time since system startup. Subsequent reports contain statistics collected during the interval since the previous report. If the Interval parameter is not specified, the vmstat command generates a single report and then exits. The Count parameter can only be specified with the Interval parameter. If the Count parameter is specified, its value determines the number of reports generated and the number of seconds apart. If the Interval parameter is specified without the Count parameter, reports are continuously generated. A Count parameter of 0 is not allowed.
The kernel maintains statistics for kernel threads, paging, and interrupt activity, which the vmstat command accesses through the use of the knlist subroutine and the /dev/kmem pseudo-device driver. The disk input/output statistics are maintained by device drivers. For disks, the average transfer rate is determined by using the active time and number of transfers information. The percent active time is computed from the amount of time the drive is busy during the report.
Note: Both the -f and -s flags can be entered on the command line, but the system will only accept the first flag specified and override the second flag.
-f Reports the number of forks since system startup.
-i Displays the number of interrupts taken by each device since system startup.
-s Writes to standard output the contents of the sum structure, which contains an absolute count of paging events since system initialization. The -s option is exclusive of the other vmstat command options. These events are described as follows:
vmstat // Displays a summary of the statistics since boot: vmstat 2 5 // Displays five summaries at 2-second intervals: vmstat scdisk13 // Displays a summary of the statistics since boot including statistics for logical disk scdisk13
Vmstat is a command that is used by the SilkPerformer SAM feature to monitor a variety of Unix flavors. Check the manual of your specific Unix verison for further information.