<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Looc at the /proc/meminfo file and the vmstat command.<br>
<br>
Divide memory parameter (free, used, whatever) by total memory,
multiply by 100 and you have percent.<br>
<br>
Machiel Richards wrote:
<blockquote
 cite="mid350DEB176C3F20459BE245610997FD7F020790F1@caretech.co.za"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
  <style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
  </style>
  <div class="Section1">
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">Hi Everyone<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">  Maybe someone can
assist me, but this may be a more linux
specific question than Nagios even though related to Nagios.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">   I need to monitor the
memory usage in percentage on Nagios
and would like to rather write my own scripts for this.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">   I know there are snmp
versions of this to do the job for
me, however I do not want to complicate the systems with too many
clients
running on them.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">Currently we are using
the normal nrpe to connect to the
systems and run scripts remotely, however we do not have one to monitor
the
memory.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">            On the web
there are a lot of references to the
snmp commands but as all the systems are production and we might be
having a
couple of upgrades soon, I would like to rather keep it simple and only
run one
client on it for all Nagios connections.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">            My question
is this… I can use the command
free to get the amount of memory , used, free etc… <o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">            How can I
write this into a script to display as
percentages… is there another command I can use or maybe an option that
I
do not know about?<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">tx<o:p></o:p></span></font></p>
  </div>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;">*** Disclaimer *** </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;"> </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;">The information
contained in this e-mail is confidential and legally privileged and is
intended solely for the addressee and to others who have the authority
to receive it. Access to this e-mail by anyone else is unauthorized and
as such, any disclosure, copying, distribution or any action taken or
omitted in reliance on it is unlawful. If you have received this e-mail
in error, please notify the sender immediately. </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;"> </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;">The views expressed in
this e-mail are the views of the individual sender and should in no way
be construed as the views of the Company. </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;"> </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;">The Company is not
liable to ensure that outgoing e-mails are virus-free. </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;"> </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;">The Company is not
liable, should information or data, for whatever reason, be corrupted
or fail to reach its intended addressee. </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;"> </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;">The Company is not
liable for any loss or damage of whatsoever nature and howsoever
arising resulting from the opening or the use of the information in
this e-mail, including its attachments and links. </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;"> </span>
  </p>
  <p style="margin-top: 0pt; margin-bottom: 0pt;"><span
 style="font-family: 'Arial'; font-size: 8pt;">The sender of this
e-mail is subject to and bound by the terms and conditions of Company’s
Electronic Communications Usage Policy. </span> </p>
  <pre wrap="">
<hr size="4" width="90%">
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
<a class="moz-txt-link-freetext" href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a></pre>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
<br>
</body>
</html>