DD2-monitor/rrdb/insert.sh

15 行
244 B
Bash
実行ファイル

#!/bin/bash
source ./commun.sh
ctime=$(date +'%s')
value=$(cut -d ' ' -f 1 /proc/loadavg)
# display and write value to a file
echo ${ctime} ${value} | tee -a bar.dat
# inject value in the rrdb file
rrdtool update $RRDB ${ctime}:${value}