3
# Plugin to monitor temperature inside Sun systems
5
# Usage: Place in /etc/munin/node.d/ (or link it there using ln -s)
7
# Parameters understood:
10
# autoconf (optional - used by munin-config)
12
# Revision 1.1 2004/04/16 Richard van den Berg <richard@vdberg.org>
15
# Revision 1.3 2004/05/20 19:02:38 jimmyo
16
# Set categories on a bunch of plugins
18
# Revision 1.2 2004/05/15 21:33:30 jimmyo
19
# "Upped" som plugins from contrib/manual to manual or auto.
23
#%# capabilities=autoconf
27
$prtdiag="/usr/platform/$arch/sbin/prtdiag";
31
if($ARGV[0] eq "config") {
36
if($ARGV[0] eq "autoconf") {
57
for($i=0;$i<=$#tempnam;$i++){
60
print "temp_$name.value $tempval[$i]\n";
65
open(PRTDIAG,"$prtdiag -v|") || return;
68
$found=1 if(m/^[^\s].*temperature/i);
72
if($tmp =~ m/ ([0-9]+)/g) {
74
push(@tempnam,substr($_,0,index($_," ")));
75
$tempnam[$#tempnam] =~ s/^\s//go;
76
$tempnam[$#tempnam] =~ s#^.*/##go;
85
print "graph_title Temperature\n";
86
print "graph_args -l 0\n";
87
print "graph_category sensors\n";
88
print "graph_vlabel temp in C\n";
89
for($i=0;$i<=$#tempnam;$i++){
92
print "temp_$name.label $tempnam[$i]\n";