package HotSaNICmod::OSdep; use RRDs; sub version { ($VERSION = '$Revision: 1.3 $') =~ s/.*(\d+\.\d+).*/$1/; return "$^O.pm $VERSION"; } sub sample { my ($drive,$KBt,$xfr,$time,$MBs); open IOSTAT, "/usr/sbin/iostat -Ix |" or die time."diskio: $!"; while () { chomp; ($drive,$KBt,$xfr,$time,$MB) = split / +/, $_; next if ($drive =~ /device/); #print localtime(time)." diskio: $drive, $KBt, $xfr, $time, $MB\n"; if ( ! -e "rrd/$drive.rrd" ) { system("./makerrd","$drive","U") } RRDs::update "rrd/$drive.rrd",time.":".($KBt*1024).":$xfr:$time:".($MB*1024*1024); if ($ERROR = RRDs::error) { print time," ",$args{MODNAME},": unable to update `$drive.rrd': $ERROR\n"; } } close IOSTAT; } 1; WebSVN - hotsanic - Blame - Rev 33 - /trunk/modules/diskio/platform/netbsd.pm
  jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [trunk/] [modules/] [diskio/] [platform/] [netbsd.pm] - Blame information for rev 33

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1