byobu-ugraph version (return code: 0)
/usr/bin/byobu-ugraph: line 208: version: command not found
byobu-ugraph --help (return code: 0)
/usr/bin/byobu-ugraph: illegal option -- -
Description: Display a graph of historical indicator values using
byobu-ulevel.
Usage: byobu-ugraph [options] [command [args...]]
Options:
-f <file> : File to read data points from.
(only required if no command specified).
-h : Show this help.
-m <num> : Minimum value (default=0).
-n : Supress output of newline character.
-p <points> : Specify number of data points in graph
(default=5).
-r : Do not rotate file <file> (default is to rotate).
Option implies file <file> should not be written to
so a command cannot follow script options in this case.
-t <theme> : 'byobu-ulevel' theme to use (default=vbars_8).
-x <num> : Maximum value (default=100).
Examples:
Using byobu-ugraph to run a command, rotate log and display graph.
Here we specify a command to display available memory.
Trailing echo adds a required newline
Note no filename specified.
byobu-ugraph "(/usr/lib/byobu/mem_used | sed -e 's/% //g';echo)"
Using byobu-ugraph just to rotate log and display the graph
file=/tmp/load.dat
awk '{ print $1}' /proc/loadavg >> $file
# Note: we need to specify what we consider to be a "reasonable" maximum load
byobu-ugraph -m 3.0 -f $file
Notes:
- If you specify 'command', care must be taken with shell quoting to
avoid expansion prior to this script running the command.
- If '-r' is not specified, the file <file> will be rotated such that
at most <points> lines are retained on each invocation of this
script.