criggie.org.nz
News | Images | MP3 | Humour | Email Us | Webmail | Links |
Poem | Debbie | Criggie | Daniel | Luke | Katherine | Gladys |
I recently installed Cacti, a graphical/web based frontend to rrdtool. Is very pretty, but can be complex. Here's a walk-through howto for creating a graph based on a script.
Cacti is probably packaged for your linux distro, or you can download the source from http://www.cacti.net/ Cacti depends on a functional MySQL installation and rrdtool.
The flow of data in cacti is complex - possibly more complex than it needs to be. However the complexity allows all sorts of separation, which makes implementing multiple copies of the same graph for different data easier.
Here's a simple sample script to return the temperature of up tp four IDE hard drives, from smartctl.
#!/bin/bash temp=0 for drive in $* ; do /usr/sbin/smartctl -a /dev/$drive | tail -n +8 | { while read id name flag value worst thresh type when blank raw; do case $name in Temperature_Celsius) temp=$raw ;; esac done echo -n "$drive:$temp " } done echo
The script returns values exactly this:
./check_smart_temp.sh hda hdb hdc hdd sda hda:22 hdb:16 hdc:18 hdd:19 sda:22rk In Progress. This is hard! PLACEHOLDER
More details will be added over time. Any queries - email me from this mailer page
This file last modified Friday July 14, 2017
If you find something here useful, feel free to donate bitcoin: Donations address: 14LHst9s1UEh8NMem87qaEd9tJWSCiNt1x
.