package HotSaNICmod::OSdep; use RRDs; sub version { ($VERSION = '$Revision: 1.4 $') =~ s/.*(\d+\.\d+).*/$1/; return "$^O.pm $VERSION"; } sub sample { my %args=@_; foreach (keys(%args)) { if (index($_,"SENSOR") >= 0 ) { ($dev,$dbname,undef,$num,$scale,$add,undef)=split(/,/,$args{$_}); open(DEVFILE,"$dev") || print time," ",$args{MODNAME},": Unable to open $dev.\n"; $_=; chomp; close DEVFILE; @array=split; $value=$array[$num-1]*$scale+$add; # build new database if needed if ( ! -e "rrd/$dbname.rrd" ) { system("./makerrd","$dbname","10000") } # update database RRDs::update "rrd/$dbname.rrd",time.":".$value; if ($ERROR = RRDs::error) { print time," ",$args{MODNAME},": unable to update `$dbname.rrd': $ERROR\n"; } } } } 1; WebSVN - hotsanic - Blame - Rev 9 - /branches/HotSaNIC-0.5.0-jablonecka/modules/sensors/platform/linux.pm.orig
  jablonka.czprosek.czf

hotsanic

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

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1