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