statpick: command line tool to get one system stat, and only one
This program is designed to emit exactly one stat, and give you a few options for changing how that stat is calculated. It is meant to be used where parsing stats from another tool is 99% of the problem you are actually working on, such as in shell scripts, desktop integrations, etc.
The CPU functionality is still Linux-focused (and turned off on other platforms; patches welcome!), but the rest is intended to be provided in a cross platform way.
Usage
statpick installs the sp tool, which you can use in your scripts.
# basic cpu usage
# default is supposed to be fast, but you can wait a little longer for a more
# reliable average over time. Time is fractional seconds.
# memory stats default to free by default.
# just get the number...
# or use a different unit...
# maybe swap values are important? see also --include-swap
# these options all apply to free, used, and total values
Next
More stats; I want better cross-platform integration, but I only really use Linux, so someone will have to send me patches.
Author
Erik Hollensbe git@hollensbe.org
License
MIT