From 5bec8ec6b59099f678f24d2a16a160c1912cc13c Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Sat, 22 Oct 2016 03:55:45 +0200 Subject: [PATCH] [cpubyuser] improved top output without header --- plugins/system/cpubyuser | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/system/cpubyuser b/plugins/system/cpubyuser index 096a32c0..26fed6e4 100755 --- a/plugins/system/cpubyuser +++ b/plugins/system/cpubyuser @@ -72,9 +72,9 @@ if [ "$1" = "config" ]; then exit fi -top -b -n 1 | tail -n +8 | \ +top -b -n 1 | sed '1,/^ *PID /d' | \ awk -v USERS="$USERS" ' - { if ($2 != "USER") CPU_USER[$2]+=$9 } + { CPU_USER[$2]+=$9 } END { others_sum = 0 for (user in CPU_USER) {