From 36cf3e7eec0fb3712b7876e1bb64787347e6c374 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 8 Aug 2011 20:31:57 +0530 Subject: Bug 3351 - Sudden spike in the network usage chart --- src/com.gluster.storage.management.gateway.scripts/src/rrd_net.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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]; -- cgit