jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [diskio/] [platform/] [freebsd.pm] - Blame information for rev 15

 

Line No. Rev Author Line
11simandlpackage HotSaNICmod::OSdep;
2 
3sub version {
4 ($VERSION = '$Revision: 1.6 $') =~ s/.*(\d+\.\d+).*/$1/;
5 return "$^O.pm $VERSION";
6 }
7 
8sub sample {
9 my (@drives,@iodat, $drive,$KBt,$xfr,$time,$MBs);
10 open IOSTAT, "/usr/sbin/iostat -Id |"
11 or die time."diskio: $!";
12 @data = <IOSTAT>;
13 close IOSTAT;
14 @drives = split / +/, $data[0];
15 @iodat = split / +/, $data[2];
16 shift @drives; shift @iodat;
17 foreach $drive (@drives) {
18 chomp $drive;
19 last if ($drive eq "");
20 $KBt = shift @iodat;
21 $xfr = shift @iodat;
22 $time= 0;
23 $MB = shift @iodat;
24 HotSaNICmod::do_rrd($drive,"U",time,$KBt*1024,$xfr,$time,$MB*1024*1024);
25 }
26 }
27 
281;

Powered by WebSVN 2.2.1