mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Merge pull request #479 from tomdee/master
Script to monitor the power state of hard drives
This commit is contained in:
commit
0fd72c2027
1 changed files with 26 additions and 0 deletions
26
plugins/harddisks/powered_up_
Executable file
26
plugins/harddisks/powered_up_
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#%# family=auto
|
||||||
|
#%# capabilities=autoconf suggest
|
||||||
|
|
||||||
|
device=`echo $0 | cut -d _ -f 3`
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
config)
|
||||||
|
cat <<EOM
|
||||||
|
graph_title Power State (/dev/$device)
|
||||||
|
graph_vlabel Power State
|
||||||
|
power.label power
|
||||||
|
graph_info The power state of drives on the system.
|
||||||
|
power.info The power state of the drive (1 is on, 0 is off)
|
||||||
|
EOM
|
||||||
|
exit 0;;
|
||||||
|
suggest)
|
||||||
|
ls -1 /dev/sd? |cut -d / -f 3
|
||||||
|
exit 0;;
|
||||||
|
autoconf)
|
||||||
|
echo yes
|
||||||
|
exit 0;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
printf "power.value "
|
||||||
|
hdparm -C /dev/$device |grep -c active
|
Loading…
Add table
Add a link
Reference in a new issue