check_memory
Trevor Warren
trevorwarren at gmail.com
Tue Feb 1 09:04:38 CET 2005
Fellas!!!,
My script for check_mem on aix and gnu/linux.
##########
bash-2.05a# cat /usr/local/nagios/libexec/check_mem.sh
#!/usr/bin/bash
avm=`vmstat | tail -n 1 | awk '{print $3}'`
fre=`vmstat | tail -n 1 | awk '{print $4}'`
avm1=`expr $avm \* 4`
fre1=`expr $fre \* 4`
echo "Total Memory is 8192MB while Active Memory is : "$avm1" KB and
Free Memory is : "$fre1" KB"
if [ $fre1 -le 800000 ]
then
{
if [ $fre1 -le 400000 ]
then
exit 2;
else
exit 1;
fi
}
else
{
exit 0;
}
fi
##########
HTH.
Trevor
On Mon, 31 Jan 2005 15:58:51 -0600, Brian Erickson
<brian.erickson at apigroupinc.us> wrote:
>
> Hi everyone,
>
> Has anyone had using the check_memory plugin (written by Gary Danko) over
> NRPE? I keep getting "CHECK_NRPE: Error receiving data from daemon." when I
> try.
>
> TIA.
>
> Brian
--
___________________________________
( >- / Scaling FreeSoftware & OpenSource \ -< )
/~\ / In the Enterprise \ /~\
| \) \ | www.fsf.org | www.opensource.org | / (/ |
|_|_ \____________________________________/ _|_|
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list