From 7fa1927121f4a442864bf008fd28eb4a89fe3e68 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 24 Oct 2017 16:32:22 -0700 Subject: [PATCH] Number of columns in vmstat output on FreeBSD isn't constant, but the three at always CPU user, kernel and idle time https://github.com/webmin/webmin/issues/659 --- system-status/system-status-lib.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-status/system-status-lib.pl b/system-status/system-status-lib.pl index 8349c685d..5a93d65e3 100755 --- a/system-status/system-status-lib.pl +++ b/system-status/system-status-lib.pl @@ -92,7 +92,7 @@ if ($gconfig{'os_type'} =~ /-linux$/ || $gconfig{'os_type'} eq 'freebsd') { else { # BSD format # CPU user, kernel, idle - $info->{'cpu'} = [ $w[14], $w[15], $w[16], 0, 0 ]; + $info->{'cpu'} = [ $w[-3], $w[-2], $w[-1], 0, 0 ]; } } }