package HotSaNICmod::OSdep; use RRDs; sub version { ($VERSION = '$Revision: 1.4 $') =~ s/.*(\d+\.\d+).*/$1/; return "$^O.pm $VERSION"; } sub sample { my %args=@_; @readings = `/usr/local/bin/mbmon -rc1` or print time," ",$args{MODNAME},": Unable to run /usr/local/bin/mbmon.\n"; foreach (keys(%args)) { if (index($_,"SENSOR") >= 0 ) { ($undef,$dev)=split(/,/,$args{$_}); foreach(@readings){ # force it to scalar just in case if(/$dev\s+:\s+(.*)/i){ $value = $1;$value++;$value--; } } # build new database if needed if ( ! -e "rrd/$dev.rrd" ) { system("./makerrd","$dev","10000") } # update database RRDs::update "rrd/$dev.rrd",time.":".$value; if ($ERROR = RRDs::error) { print time," ",$args{MODNAME},": unable to update `$dev.rrd': $ERROR\n"; } } } } 1; WebSVN - hotsanic - Blame - Rev 9 - /branches/HotSaNIC-0.5.0-jablonecka/modules/sensors/platform/freebsd.pm
  jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-jablonecka/] [modules/] [sensors/] [platform/] [freebsd.pm] - Blame information for rev 9

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1