3 # Graph fans on Proliant Servers 
 
   8 my $hpasmcli = "/sbin/hpasmcli";
 
   9 my $cmd = "$hpasmcli -s \"show fans\"";
 
  10 # C/F : graph temp in celsius or fahrenheit
 
  15 #(-f $hpasmcli) || exit(1);
 
  17 foreach my $line (@result) {
 
  22         my ($sensor, $loc, $present, $speed_state, $speed, $redundant) = split(/\s/, $line);
 
  23         next if ($speed eq "-");
 
  28         $val{$sensor} = {location => lc($loc),
 
  36 if ($ARGV[0] && $ARGV[0] eq "config") {
 
  38     print "graph_title Fans\n";
 
  39     print "graph_vlabel fans speed as % of max\n";
 
  40     print "graph_category sensors\n";
 
  41     while (my ($k, $hashref) = each (%val)) {
 
  42         print "$hashref->{location}.label $hashref->{location}\n";
 
  43         print "$hashref->{location}.warning 85\n";
 
  44         print "$hashref->{location}.critical 100\n";
 
  49     while (my ($k, $hashref) = each (%val)) {
 
  50         print "$hashref->{location}.value $hashref->{speed}\n";