Attempts to mimic the cli behavior of procps-ng $ watch
but the output is graphed (technically plotted) instead of printed.
gwatch
will graph the first number it is able to find and discard every thing else.
brew install robertely/gwatch/gwatch
wget https://github.com/robertely/gwatch/releases/download/0.0.3/gwatch_0.0.3_amd64.deb
sudo dpkg -i gwatch_0.0.3_amd64.deb
wget https://github.com/robertely/gwatch/releases/download/0.0.3/gwatch-0.0.3-1.x86_64.rpm
sudo rpm -ivh gwatch-0.0.3-1.x86_64.rpm
git clone git@github.com:robertely/gwatch.git
cd gwatch
go get ./...
go build
graphing watch: execute a program periodically, graphing the output fullscreen
Usage: gwatch [-behtvx] [-n value] [parameters ...]
-b, --beep beep if command has a non-zero exit
-e, --errexit exit if command has a non-zero exit
-h, --help display this help and exit
-n, --interval=value
seconds to wait between updates
-s, --stats show basic statistics below graph
-t, --no-title turn off header
-v, --version output version information and exit
-x, --exec pass command to exec instead of "sh -c"
$ gwatch 'sysctl -n vm.loadavg | cut -d" " -f2'
$ gwatch "vm_stat | grep 'Pages free'"
$ gwatch -s -n .06 "free | grep Mem | awk '{print 100-(\$3/\$2 * 100.0)}'"
$ gwatch "curl -w "%{time_total}" -o /dev/null -s 'https://google.com'"