From f10416229845005b307173df91a85ce8e35e9f3f Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Wed, 16 Sep 2015 10:57:27 +0200 Subject: [PATCH] fixed regexp in 'free' command output that affected the swap usage value (after upgrading to CentOS 6.7) --- lib/fs.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fs.pm b/lib/fs.pm index 74800e2..2634a87 100644 --- a/lib/fs.pm +++ b/lib/fs.pm @@ -595,7 +595,7 @@ sub fs_update { if($config->{os} eq "Linux") { open(IN, "free |"); while() { - if(/^Swap:\s+\d+\s+(\d+)\s+(\d+)$/) { + if(/^Swap:\s+\d+\s+(\d+)\s+(\d+)\s*$/) { $used = $1; $free = $2; }