vmstat.d 1m "$Date:: 2007-08-05 #$" "USER COMMANDS"
NAME
vmstat.d - vmstat demo in DTrace. Uses DTrace.
SYNOPSIS
vmstat.d
DESCRIPTION
This has been written to demonstrate fetching the same data as vmstat from DTrace. This program is intended as a starting point for other DTrace scripts, by beginning with familiar statistics. Since this uses DTrace, only the root user or users with the dtrace_kernel privilege can run this command.
OS
Solaris
STABILITY
unstable - uses various kernel symbols.
EXAMPLES

Print virtual memory statistics every second, # vmstat.d

FIELDS

w swapped out light weight processes

swap virtual memory free, Kbytes

free free RAM, Kbytes

re page reclaims, Kbytes

mf minor faults, Kbytes

pi page ins, Kbytes

po page outs, Kbytes

fr pages freed, Kbytes

sr scan rate, pages

in interrupts, number

sy system calls, number

cs context switches, number

NOTES
Most of the statistics are in units of kilobytes, unlike the original vmstat command which sometimes uses page counts. As this program does not use Kstat, there is no summary since boot line. Free RAM is both free free + cache free.

DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output.
EXIT
vmstat.d will run until Ctrl-C is hit.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO
vmstat(1M), dtrace(1M)