summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim <timothyasir@gluster.com>2011-08-08 20:31:57 +0530
committerTim <timothyasir@gluster.com>2011-08-08 20:31:57 +0530
commit36cf3e7eec0fb3712b7876e1bb64787347e6c374 (patch)
tree1bc70abcb21c260e736c8e16935c539400c12069
parent02f6e5d014eda5cd33e08ab5e5260ebd69f864de (diff)
Bug 3351 - Sudden spike in the network usage chart
-rwxr-xr-xsrc/com.gluster.storage.management.gateway.scripts/src/rrd_net.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com.gluster.storage.management.gateway.scripts/src/rrd_net.pl b/src/com.gluster.storage.management.gateway.scripts/src/rrd_net.pl
index 03f4f492..c88afced 100755
--- a/src/com.gluster.storage.management.gateway.scripts/src/rrd_net.pl
+++ b/src/com.gluster.storage.management.gateway.scripts/src/rrd_net.pl
@@ -42,8 +42,9 @@ sub updatenetdata {
/:.+/ or next; # if input line contains ':' else continue
next if /^lo:\s/; # continue if input line starts with 'lo:'
- @tokens1 = split /:/;
- @tokens2 = split(/\s+/, $tokens1[1]);
+ @tokens1 = split /:/; # split with ':'
+ $tokens1[1]=~s/^\s+//; # remove left side whitespaces
+ @tokens2 = split(/\s+/, $tokens1[1]); # split with space
$device = $tokens1[0];
$received = $tokens2[0];