Projet

Général

Profil

Révision 4b21d581

ID4b21d5819537416c7f88965036abc7fc7425a422
Parent 6f7473b2
Enfant 391a4bfa

Ajouté par Lars Kruse il y a environ 9 ans

[cpubyuser] expand magic 'ALL' user before config

Voir les différences:

plugins/system/cpubyuser
39 39

  
40 40
. "$MUNIN_LIBDIR/plugins/plugin.sh"
41 41

  
42
[ "$USERS" = "ALL" ] && USERS=$(w --no-header | awk '{ print $1 }' | sort | uniq)
43

  
44

  
42 45
if [ "$1" = "autoconf" ]; then
43 46
	if [ -n "$USERS" ]; then
44 47
		echo "yes"
......
68 71
	exit
69 72
fi
70 73

  
71
if [ "$USERS" = "ALL" ]; then
72
       USERS=$( w | awk '{ print $1 }' )
73
fi
74

  
75 74
top -b -n 1 | tail -n +8 | \
76 75
	awk -v USERS="$USERS" '
77 76
		{ if ($2 != "USER") CPU_USER[$2]+=$9 }

Formats disponibles : Unified diff