summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpbuetow <puppet@mx.buetow.org>2012-06-26 23:44:14 +0200
committerpbuetow <puppet@mx.buetow.org>2012-06-26 23:44:14 +0200
commit2720501a0753e9414836c18ec655465f89e7c5e3 (patch)
tree79372c85511791fc770cc425a2fbeea915d75327
parentf1e9c0f0ec0e5683d5892636e1d309ed092e3a4c (diff)
foo
-rw-r--r--lib/Loadbars/Main.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Loadbars/Main.pm b/lib/Loadbars/Main.pm
index c969dcf..0ee36bc 100644
--- a/lib/Loadbars/Main.pm
+++ b/lib/Loadbars/Main.pm
@@ -273,6 +273,7 @@ sub net_parse ($) {
my ($line_r) = shift;
my ($a, $b) = split ' ', $$line_r;
+
my %a = map {
my ($k, $v) = split '=', $_;
$k => $v;
@@ -747,8 +748,10 @@ sub loop ($@) {
my $int = $C{netint};
my $key = "$host;$int";
+ if (exists $NETSTATS{$key}) {
+
$net_history{$key} = [net_parse \$NETSTATS{$key}]
- unless exists $net_history{$key} && exists $NETSTATS{$key};
+ unless exists $net_history{$key};
my $now_stat_r = net_parse \$NETSTATS{$key};
my $prev_stat_r = $net_history{$key}[0];
@@ -766,9 +769,6 @@ sub loop ($@) {
my $net_per = percentage $net_max_bytes, $diff_stat_r->{b};
my $tnet_per = percentage $net_max_bytes, $diff_stat_r->{tb};
-#use Data::Dumper;
-# print "$net_max_bytes $diff_stat_r->{b} $net_per ; $net_max_bytes $diff_stat_r->{tb} $tnet_per\n";
-
my %heights = (
NetFree => $net_per * ( $C{height} / 100 ),
NetUsed => ( 100 - $net_per ) * ( $C{height} / 100 ),
@@ -823,6 +823,8 @@ sub loop ($@) {
( 100 - $meminfo{swap_per} )
);
}
+
+ }
}
if ( $C{showcores} ) {