Этот коммит содержится в:
tth 2019-01-04 14:09:02 +01:00
родитель 82c64d81cb
Коммит f546418fb4
2 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -4,7 +4,8 @@ source ./commun.sh
tmpf="somevalues.dat"
rrdtool fetch $RRDB LAST |
rrdtool fetch $RRDB LAST \
--start 0 |
tr -d ':' |
awk '
(!/nan/ && NF==2) { print $1, $2 }
@ -15,11 +16,14 @@ awk '
# as an example, we are gnuploting our datas
#
gnuplot << __EOC__
set term png size 800,600
set term png size 1024,512
set output "graphe.png"
set grid
plot "${tmpf}" with lines
set xdata time
set timefmt "%s"
set format x "%m/%d\n%H:%M"
plot "${tmpf}" using 1:2 with lines
__EOC__
rm ${tmpf}
# rm ${tmpf}

Просмотреть файл

@ -5,7 +5,7 @@ source ./commun.sh
ctime=$(date +'%s')
value=$(cut -d ' ' -f 1 /proc/loadavg)
# write value to a file
# display and write value to a file
echo ${ctime} ${value} | tee -a bar.dat
# inject value in the rrdb file