O'Reilly logo

Absolute FreeBSD, 2nd Edition by Michael W. Lucas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

General Bottleneck Analysis with vmstat(8)

FreeBSD includes several programs for examining system performance. Among these are vmstat(8), iostat(8), and systat(1). We'll discuss vmstat because I find it most helpful; iostat(8) is similar to vmstat(8), and systat(1) provides the same information in an ASCII graphical format.

vmstat(8) shows the current virtual memory statistics. While its output takes getting used to, vmstat(8) is very good at showing large amounts of data in a small space. Type vmstat at the command prompt and follow along.

# vmstat
 procs      memory       page                    disks   faults     cpu
 r b w     avm     fre   flt  re  pi  po    fr  sr ad0    in   sy   cs us  sy id
 3 0 0  580416 1388912   234  11   7   0   209   0   0   171 5796 3816  3  10 87

vmstat divides its display into six sections: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required