jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [diskio/] [platform/] [netbsd.pm] - Rev 31 Go to most recent revision

Compare with Previous - Blame - Download


package HotSaNICmod::OSdep;

sub version {
  ($VERSION = '$Revision: 1.5 $') =~ 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 (<IOSTAT>) {
    chomp;
    ($drive,$KBt,$xfr,$time,$MB) = split / +/, $_;
    next if ($drive =~ /device/);
    HotSaNICmod::do_rrd($drive,"U",time,$KBt*1024,$xfr,$time,$MB*1024*1024);
    }
  close IOSTAT;
  }

1;


Powered by WebSVN 2.2.1