Monitoring du Phytotron
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

insert.sh 244B

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