Files
karasz 38a20c881e fluxplug: start the restructure of the project
In order to be more crontab friendly, fluxplug will be the only
executable called by cron in an every minute job, Something like

* * * * * /path/to/fluxplug >/dev/null 2>&1

Signed-off-by: Nagy Károly Gábriel <k@jpi.io>
2019-04-04 18:16:10 +03:00

11 lines
288 B
Bash

#!/bin/sh
set -o noclobber
me="loadavg"
LINE=$("$AWK" -v myhost="$myhost" -v time=`date -u +%s%N` '{load1=$1; load5=$2; load15=$3 } END {printf "loadavg,host=%s load_1=%s,load_5=%s,load_15=%s %s\n",myhost,load1,load5,load15,time}' /proc/loadavg )
writeline "$LINE" "$MAXLINES" "$me"