diff options
| author | Tim <timothyasir@gluster.com> | 2011-08-08 20:31:57 +0530 |
|---|---|---|
| committer | Tim <timothyasir@gluster.com> | 2011-08-08 20:31:57 +0530 |
| commit | 36cf3e7eec0fb3712b7876e1bb64787347e6c374 (patch) | |
| tree | 1bc70abcb21c260e736c8e16935c539400c12069 /src | |
| parent | 02f6e5d014eda5cd33e08ab5e5260ebd69f864de (diff) | |
Bug 3351 - Sudden spike in the network usage chart
Diffstat (limited to 'src')
| -rwxr-xr-x | src/com.gluster.storage.management.gateway.scripts/src/rrd_net.pl | 5 |
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]; |
