put password to clipboard
[sunny256-utils.git] / log_load
blob8d9f20b2f7ba5331cd841d30fc7ef817a81cad85
1 #!/bin/sh
3 # log_load
4 # File ID: b74fcc82-5d3e-11df-b433-90e6ba3022ac
5 # Logger maskinload til ~/log/load/ÅÅÅÅ/ÅÅÅÅ-MM-DD.load.log
7 logdir=$HOME/log
9 [ -d $logdir ] || mkdir -p logdir || { echo "$0: mkdir $logdir: På trynet" >&2; exit 1; }
10 [ -x /usr/bin/cronolog ] || { echo "$0: Fant ikke /usr/sbin/cronolog, avbryter." >&2; exit 1; }
12 (echo -n "`date -u +"%Y-%m-%dT%H:%M:%SZ"` "; cat /proc/loadavg) | /usr/bin/cronolog -z 0 -S $logdir/curr_load $logdir/load/%Y/%Y-%m-%d.load.log