mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
[cpubyuser] simplify AREASTACK usage
This commit is contained in:
parent
78f4e42d21
commit
a465880501
1 changed files with 1 additions and 7 deletions
|
@ -58,18 +58,12 @@ if [ "$1" = "config" ]; then
|
||||||
echo "graph_period second"
|
echo "graph_period second"
|
||||||
_USERS="$(for user in $USERS; do clean_fieldname "$user" | tr '\n' ' '; done)"
|
_USERS="$(for user in $USERS; do clean_fieldname "$user" | tr '\n' ' '; done)"
|
||||||
echo "graph_order $_USERS others"
|
echo "graph_order $_USERS others"
|
||||||
FIRSTUSER=1;
|
|
||||||
for USER in $USERS "others"; do
|
for USER in $USERS "others"; do
|
||||||
_USER="$(clean_fieldname "$USER")"
|
_USER="$(clean_fieldname "$USER")"
|
||||||
echo "${_USER}.label $USER"
|
echo "${_USER}.label $USER"
|
||||||
echo "${_USER}.info CPU used by user $USER"
|
echo "${_USER}.info CPU used by user $USER"
|
||||||
echo "${_USER}.type GAUGE"
|
echo "${_USER}.type GAUGE"
|
||||||
if [ $FIRSTUSER -eq 1 ]; then
|
echo "${_USER}.draw AREASTACK"
|
||||||
echo "${_USER}.draw AREA"
|
|
||||||
FIRSTUSER=0
|
|
||||||
else
|
|
||||||
echo "${_USER}.draw STACK"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue