1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00
This commit is contained in:
Gilles Fauvie 2014-03-05 16:37:06 +01:00
parent 0283dce0ab
commit ee4950cb87

View file

@ -5,8 +5,10 @@
# #
# Configure it by using the processes env var, i.e.: # Configure it by using the processes env var, i.e.:
# #
# WARNING: SELINUX can block this plugin
#
# [proc_mem_by_user] # [proc_mem_by_user]
# env.processes munin-node jprod # env.users munin-node jprod
# #
. $MUNIN_LIBDIR/plugins/plugin.sh . $MUNIN_LIBDIR/plugins/plugin.sh
@ -16,7 +18,7 @@ if [ "$1" = "autoconf" ]; then
exit 0 exit 0
fi fi
users=${processes:="munin-node"} users=${users:="munin-node"}
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
echo 'graph_title Memory usage by process by user' echo 'graph_title Memory usage by process by user'
@ -37,4 +39,4 @@ fi
for user in $users; do for user in $users; do
echo "$user.value " `ps u -U $user | awk 'BEGIN { sum = 0 } NR > 1 { sum += $6 }; END { print sum * 1024 }'` echo "$user.value " `ps u -U $user | awk 'BEGIN { sum = 0 } NR > 1 { sum += $6 }; END { print sum * 1024 }'`
done done