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>
This commit is contained in:
2019-04-04 18:16:10 +03:00
parent 0d4f034146
commit 38a20c881e
9 changed files with 77 additions and 76 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
set -o noclobber
me="disks"
LINE=$($DF | $SED | "$AWK" -v myhost="$myhost" -v time=`date -u +%s%N` '{sub(/\%$/,"",$5);printf "disks,host=%s,disk=%s total=%s,available=%s,used=%s,percent=%s %s\n",myhost,$1,$2,$4,$3,$5,time}')
writeline "$LINE" $((2*$MAXLINES)) "$me"