mirror of https://github.com/mikaku/Monitorix.git
changed the way how 'ztool iostat' command get the read/write values of the
Operations/Bandwidth graphs #242
This commit is contained in:
parent
28ed22b311
commit
3c1b2602a3
2
Changes
2
Changes
|
@ -18,6 +18,8 @@
|
||||||
- Changed how the values in 'fail2ban.pm' are shown. Now it shows the Bans as
|
- Changed how the values in 'fail2ban.pm' are shown. Now it shows the Bans as
|
||||||
absolute values. The new option 'graph_mode' permits switching between
|
absolute values. The new option 'graph_mode' permits switching between
|
||||||
'absolute' (default) and 'rate'. [#241]
|
'absolute' (default) and 'rate'. [#241]
|
||||||
|
- Changed the way how 'ztool iostat' command get the read/write values of the
|
||||||
|
Operations/Bandwidth graphs. [#242]
|
||||||
- Fixed the copyright year in 'monitorix.cgi'.
|
- Fixed the copyright year in 'monitorix.cgi'.
|
||||||
- Fixed in 'mail.pm to use the option 'mail_log' instead the hard coded path I
|
- Fixed in 'mail.pm to use the option 'mail_log' instead the hard coded path I
|
||||||
forgot to remove when adding the Exim support.
|
forgot to remove when adding the Exim support.
|
||||||
|
|
10
lib/zfs.pm
10
lib/zfs.pm
|
@ -267,6 +267,7 @@ sub zfs_update {
|
||||||
my $pool = (split(',', $zfs->{list}))[$n] || "";
|
my $pool = (split(',', $zfs->{list}))[$n] || "";
|
||||||
if($pool) {
|
if($pool) {
|
||||||
my @zpool;
|
my @zpool;
|
||||||
|
my @data;
|
||||||
|
|
||||||
$free = trim(`zfs get -Hp -o value available $pool`);
|
$free = trim(`zfs get -Hp -o value available $pool`);
|
||||||
$udata = trim(`zfs get -Hp -o value used $pool`);
|
$udata = trim(`zfs get -Hp -o value used $pool`);
|
||||||
|
@ -282,8 +283,13 @@ sub zfs_update {
|
||||||
}
|
}
|
||||||
$cap =~ s/%//;
|
$cap =~ s/%//;
|
||||||
$fra =~ s/[%-]//g; $fra = $fra || 0;
|
$fra =~ s/[%-]//g; $fra = $fra || 0;
|
||||||
@zpool = split(' ', `zpool iostat -Hp $pool` || "");
|
|
||||||
(undef, undef, undef, $oper, $opew, $banr, $banw) = @zpool;
|
open(IN, "zpool iostat -Hp $pool 5 2 |");
|
||||||
|
while(<IN>) {
|
||||||
|
push(@data, $_);
|
||||||
|
}
|
||||||
|
close(IN);
|
||||||
|
(undef, undef, undef, $oper, $opew, $banr, $banw) = split(' ', $data[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$rrdata .= ":$free:$udata:$usnap:$cap:$fra:$oper:$opew:$banr:$banw:0";
|
$rrdata .= ":$free:$udata:$usnap:$cap:$fra:$oper:$opew:$banr:$banw:0";
|
||||||
|
|
Loading…
Reference in New Issue