mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
fix bug
This commit is contained in:
parent
0283dce0ab
commit
ee4950cb87
@ -5,8 +5,10 @@
|
||||
#
|
||||
# Configure it by using the processes env var, i.e.:
|
||||
#
|
||||
# WARNING: SELINUX can block this plugin
|
||||
#
|
||||
# [proc_mem_by_user]
|
||||
# env.processes munin-node jprod
|
||||
# env.users munin-node jprod
|
||||
#
|
||||
|
||||
. $MUNIN_LIBDIR/plugins/plugin.sh
|
||||
@ -16,7 +18,7 @@ if [ "$1" = "autoconf" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
users=${processes:="munin-node"}
|
||||
users=${users:="munin-node"}
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Memory usage by process by user'
|
||||
@ -37,4 +39,4 @@ fi
|
||||
|
||||
for user in $users; do
|
||||
echo "$user.value " `ps u -U $user | awk 'BEGIN { sum = 0 } NR > 1 { sum += $6 }; END { print sum * 1024 }'`
|
||||
done
|
||||
done
|
Loading…
Reference in New Issue
Block a user