hotsanic |
Subversion Repositories: |
Line No. | Rev | Author | Line |
---|---|---|---|
1 | 1 | simandl | package HotSaNICmod::OSdep; |
2 | |
||
3 | sub version { |
||
4 | ($VERSION = '$Revision: 1.5 $') =~ s/.*(\d+\.\d+).*/$1/; |
||
5 | return "$^O.pm $VERSION"; |
||
6 | } |
||
7 | |
||
8 | sub sample { |
||
9 | my ($drive,$KBt,$xfr,$time,$MBs); |
||
10 | open IOSTAT, "/usr/sbin/iostat -Ix |" |
||
11 | or die time."diskio: $!"; |
||
12 | while (<IOSTAT>) { |
||
13 | chomp; |
||
14 | ($drive,$KBt,$xfr,$time,$MB) = split / +/, $_; |
||
15 | next if ($drive =~ /device/); |
||
16 | HotSaNICmod::do_rrd($drive,"U",time,$KBt*1024,$xfr,$time,$MB*1024*1024); |
||
17 | } |
||
18 | close IOSTAT; |
||
19 | } |
||
20 | |
||
21 | 1; |
||
22 | |