mirror of https://github.com/mikaku/Monitorix.git
fixed regexp in 'free' command output that affected the swap usage value (after upgrading to CentOS 6.7)
This commit is contained in:
parent
d2465c2356
commit
f104162298
|
@ -595,7 +595,7 @@ sub fs_update {
|
||||||
if($config->{os} eq "Linux") {
|
if($config->{os} eq "Linux") {
|
||||||
open(IN, "free |");
|
open(IN, "free |");
|
||||||
while(<IN>) {
|
while(<IN>) {
|
||||||
if(/^Swap:\s+\d+\s+(\d+)\s+(\d+)$/) {
|
if(/^Swap:\s+\d+\s+(\d+)\s+(\d+)\s*$/) {
|
||||||
$used = $1;
|
$used = $1;
|
||||||
$free = $2;
|
$free = $2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue