2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

[cpubyuser] user constant for magic 'others' user

This commit is contained in:
Lars Kruse 2016-10-22 03:52:05 +02:00
parent 4b21d58195
commit 391a4bfa41

View File

@ -39,6 +39,7 @@
. "$MUNIN_LIBDIR/plugins/plugin.sh"
OTHER_FIELD="others"
[ "$USERS" = "ALL" ] && USERS=$(w --no-header | awk '{ print $1 }' | sort | uniq)
@ -60,8 +61,8 @@ if [ "$1" = "config" ]; then
echo "graph_scale no"
echo "graph_period second"
user_fields="$(for user in $USERS; do clean_fieldname "$user" | tr '\n' ' '; done)"
echo "graph_order $user_fields others"
for user in $USERS "others"; do
echo "graph_order $user_fields $OTHER_FIELD"
for user in $USERS "$OTHER_FIELD"; do
user_field="$(clean_fieldname "$user")"
echo "${user_field}.label $user"
echo "${user_field}.info CPU used by user $user"