diff options
| author | Paul Buetow <paul@buetow.org> | 2012-06-23 20:11:52 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2012-06-23 20:11:52 +0200 |
| commit | c0f4acfd5beb1f750bef1d6fffdd1260f6318fd7 (patch) | |
| tree | be9e872d0d73eac247d59fa4b60ed219ed30d475 /lib | |
| parent | dc0728da5e0037f471fa8e7136dd1517f1b68d9d (diff) | |
fix
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Loadbars/Main.pm | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/lib/Loadbars/Main.pm b/lib/Loadbars/Main.pm index c82779b..3aaf176 100644 --- a/lib/Loadbars/Main.pm +++ b/lib/Loadbars/Main.pm @@ -639,11 +639,7 @@ sub loop ($@) { $app->fill( $rect_nice, Loadbars::Constants->GREEN ); $app->fill( $rect_iowait, Loadbars::Constants->PURPLE ); - $app->update( - $rect_idle, $rect_iowait, $rect_irq, - $rect_nice, $rect_softirq, $rect_steal, - $rect_guest, $rect_system, $rect_user, - ); + my $rect_memused = get_rect $rects, "$host;memused"; my $rect_memfree = get_rect $rects, "$host;memfree"; @@ -713,11 +709,6 @@ sub loop ($@) { $app->fill( $rect_swapused, Loadbars::Constants->GREY ); $app->fill( $rect_swapfree, Loadbars::Constants->BLACK ); - $app->update( - $rect_memfree, $rect_memused, - $rect_swapused, $rect_swapfree - ) if $C{showmem}; - if ( $C{showtext} ) { my $y_ = 5; $app->print( $x + $add_x, $y_, 'Ram:' ); @@ -780,11 +771,6 @@ sub loop ($@) { $app->fill( $rect_tnetused, Loadbars::Constants->LIGHT_BLUE0 ); $app->fill( $rect_tnetfree, Loadbars::Constants->BLACK ); - $app->update( - $rect_netfree, $rect_netused, - $rect_tnetfree, $rect_tnetused - ) if $C{shownet}; - if ( $C{showtext} ) { my $y_ = 5; $app->print( $x + $add_x, $y_, 'Rx:' ); @@ -984,6 +970,22 @@ sub loop ($@) { } } + $app->update( + $rect_idle, $rect_iowait, $rect_irq, + $rect_nice, $rect_softirq, $rect_steal, + $rect_guest, $rect_system, $rect_user, + ); + + $app->update( + $rect_memfree, $rect_memused, + $rect_swapused, $rect_swapfree + ) if $C{showmem}; + + $app->update( + $rect_netfree, $rect_netused, + $rect_tnetfree, $rect_tnetused + ) if $C{shownet}; + $app->update($rect_separator) if defined $rect_separator; $x += $width + 1 + $add_x; |
