mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
mistake in the calculation of shared memory, this feature was lost.
This commit is contained in:
parent
ce8f95f171
commit
b4c1a51462
1 changed files with 92 additions and 105 deletions
|
@ -30,12 +30,6 @@
|
|||
#env.process_3 mysqld
|
||||
#---------------------------------------------------
|
||||
#
|
||||
#set alert memory(MB)
|
||||
#---------------------------------------------------
|
||||
#[healthcheck_process]
|
||||
#env.process_1 httpd
|
||||
#env.alertmemory_1 1024 #1G (sum all httpd process)
|
||||
#---------------------------------------------------
|
||||
#
|
||||
#
|
||||
|
||||
|
@ -53,9 +47,6 @@ if [ "$1" = "autoconf" ]; then
|
|||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
MemTotal=`cat /proc/meminfo | grep MemTotal | awk '{ print $2 }'`
|
||||
let MemTotal="$MemTotal / 1024 " #MB
|
||||
let MemTotal15="$MemTotal * 3 / 2" #$MemTotal*1.5
|
||||
|
||||
echo 'graph_title process memory Usage(MB)'
|
||||
echo "graph_args --base 1000 -l 0 --vertical-label MB"
|
||||
|
@ -71,16 +62,12 @@ if [ "$1" = "config" ]; then
|
|||
if [ "x${process}" = "x" ]; then
|
||||
continue
|
||||
fi
|
||||
if [ "x${alertmemory}" = "x" ]; then
|
||||
alertmemory=${MemTotal}
|
||||
fi
|
||||
|
||||
echo "$process.label $process"
|
||||
echo "$process.info Memory used by $process"
|
||||
echo "$process.draw LINE2"
|
||||
echo "$process.min -10"
|
||||
echo "$process.max ${MemTotal15}"
|
||||
echo "$process.critical 0:${alertmemory}"
|
||||
echo "$process.critical 0:"
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue