From bd095a1b9a2027a1ff43fe4b6fa04d0354ca062c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 13 Feb 2026 20:48:13 +0200 Subject: Convert POD documentation to Markdown and migrate to Justfile - Convert all POD files to Markdown format - Replace Makefile with justfile for build automation - Remove deprecated Debian packaging files and related directories - Update copyright year from 2013 to 2026 in Constants.pm and loadbars - Remove obsolete docs directory (bugs, wishlist, and generated files) - Fix sum() function in Utils.pm to handle undef values properly --- lib/Loadbars/Main.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/Loadbars/Main.pm') diff --git a/lib/Loadbars/Main.pm b/lib/Loadbars/Main.pm index f53bad8..4b750dc 100644 --- a/lib/Loadbars/Main.pm +++ b/lib/Loadbars/Main.pm @@ -60,15 +60,17 @@ sub cpu_parse_line ($) { my $line = shift; my ( $name, %load ); - ( $name, @load{qw(user nice system idle iowait irq softirq steal guest)} ) = + # Modern kernels (2.6.33+) have 10 fields: user nice system idle iowait irq softirq steal guest guest_nice + ( $name, @load{qw(user nice system idle iowait irq softirq steal guest guest_nice)} ) = split ' ', $line; - # Not all kernels support this + # Not all kernels support these fields $load{steal} = 0 unless defined $load{steal}; $load{guest} = 0 unless defined $load{guest}; + $load{guest_nice} = 0 unless defined $load{guest_nice}; $load{TOTAL} = - sum( @load{qw(user nice system idle iowait irq softirq steal guest)} ); + sum( @load{qw(user nice system idle iowait irq softirq steal guest guest_nice)} ); return ( $name, \%load ); } -- cgit v1.2.3