diff options
| author | pbuetow (lxpbuetow) <puppet@mx.buetow.org> | 2011-12-27 13:05:23 +0100 |
|---|---|---|
| committer | pbuetow (lxpbuetow) <puppet@mx.buetow.org> | 2011-12-27 13:05:23 +0100 |
| commit | e5602aad08db086a7063e6ded6f05dda417c9c47 (patch) | |
| tree | cefbd6f4646efe0ee9f4ceeae076bd612d30518a | |
| parent | 7003029f282fcfc0e302bfd1ce2def3a7aef5b8f (diff) | |
Bugfix
| -rw-r--r-- | CHANGELOG | 3 | ||||
| -rwxr-xr-x | loadbars | 5 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,6 @@ +Tue Dec 27 13:04:43 CET 2011 +* Bugfix: Max system+user peak is never >100% + Tue Dec 27 12:28:40 CET 2011 * Released v0.3.1 * --cluster option (which reads the ClusterSSH config file /etc/clusters/) @@ -26,7 +26,7 @@ use threads::shared; use constant { DEPTH => 8, - VERSION => 'loadbars v0.3.1', + VERSION => 'loadbars v0.3.1-devel', Copyright => '2010-2011 (c) Paul Buetow <loadbars@mx.buetow.org>', CSSH_CONFFILE => '/etc/clusters', CSSH_MAX_RECURSION => 10, @@ -176,7 +176,7 @@ sub normalize_loads (%) { sub get_cpuaverage ($@) { my ($factor, @loads) = @_; - my (%cpumax, %cpuaverage); + my (%cpumax, %cpuaverage); for my $l (@loads) { for (keys %$l) { @@ -439,6 +439,7 @@ sub main_loop ($@) { $rect_peak->y($C{height} - $maxheights{system} - $maxheights{user}); $max_system_n_user = sum @{$cpumax}{qw(user system)}; + $max_system_n_user = 100 if $max_system_n_user > 100; $app->fill($rect_peak, $max_system_n_user > Loadbars::USER_WHITE ? Loadbars::WHITE : ($max_system_n_user > Loadbars::USER_RED ? Loadbars::RED |
