sonian/sensu-community-plugins — pull request #17 by robinbowes (2012-02-22 23:02:34+00:00)
Title: Fix-up vmstat call to use correct stats

From the vmstat man page:

The first report produced gives averages since the last reboot. Additional reports give informa-
tion on a sampling period of length delay. The process and memory reports are instantaneous in
either case.

So, when run with no arguments, vmstat produces figures that are averages since the last reboot - not entirely useful!

This small change ensures that vmstat runs twice, and the plugin parses the second line of output which will be the values measured over the previous second.