mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
[cpubyuser] improved top output without header
This commit is contained in:
parent
391a4bfa41
commit
5bec8ec6b5
1 changed files with 2 additions and 2 deletions
|
@ -72,9 +72,9 @@ if [ "$1" = "config" ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
top -b -n 1 | tail -n +8 | \
|
top -b -n 1 | sed '1,/^ *PID /d' | \
|
||||||
awk -v USERS="$USERS" '
|
awk -v USERS="$USERS" '
|
||||||
{ if ($2 != "USER") CPU_USER[$2]+=$9 }
|
{ CPU_USER[$2]+=$9 }
|
||||||
END {
|
END {
|
||||||
others_sum = 0
|
others_sum = 0
|
||||||
for (user in CPU_USER) {
|
for (user in CPU_USER) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue