diff --git a/plugins/system/cpubyuser b/plugins/system/cpubyuser index 39469981..096a32c0 100755 --- a/plugins/system/cpubyuser +++ b/plugins/system/cpubyuser @@ -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"