<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: command to check memory/cpu usage in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073803#M308043</link>
    <description>My apologies John Joubert for not assigning&lt;BR /&gt;points fast enough for you. &lt;BR /&gt;&lt;BR /&gt;Sometimes I cannot always get back to&lt;BR /&gt;everyone on points immediately. I do go back&lt;BR /&gt;from time to time to place them all but I do&lt;BR /&gt;not have the luxury as do others to have&lt;BR /&gt;such free time when I have to work crisis's here to fix company problems.&lt;BR /&gt;</description>
    <pubDate>Thu, 27 Sep 2007 15:58:48 GMT</pubDate>
    <dc:creator>jerry1</dc:creator>
    <dc:date>2007-09-27T15:58:48Z</dc:date>
    <item>
      <title>command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073793#M308033</link>
      <description>Does anyone know what command line command&lt;BR /&gt;there is to get the memory/cpu usage so I can&lt;BR /&gt;use it with nagios. There does not seem to be &lt;BR /&gt;any pre-compiled check for memory or cpu usage&lt;BR /&gt;in nagios.</description>
      <pubDate>Thu, 20 Sep 2007 16:33:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073793#M308033</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2007-09-20T16:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073794#M308034</link>
      <description>-- CPU usage every 5 secs for 100 iterations&lt;BR /&gt;&lt;BR /&gt;# sar -Mu 5 100&lt;BR /&gt;&lt;BR /&gt;-- Memory usage ever 5 secs for 100 iterations&lt;BR /&gt;&lt;BR /&gt;# vmstat -S 5 100</description>
      <pubDate>Thu, 20 Sep 2007 16:44:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073794#M308034</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-09-20T16:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073795#M308035</link>
      <description>Already looked at those commands. &lt;BR /&gt;Does not give me the values I need like in &lt;BR /&gt;glance in percent.&lt;BR /&gt;                      Current&lt;BR /&gt;CPU  Util            | 14%     14%   14%&lt;BR /&gt;Mem  Util            | 47%     47%   47%&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Sep 2007 17:03:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073795#M308035</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2007-09-20T17:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073796#M308036</link>
      <description>try the 'top' command&lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;GM</description>
      <pubDate>Thu, 20 Sep 2007 18:07:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073796#M308036</guid>
      <dc:creator>GrayMatter_1</dc:creator>
      <dc:date>2007-09-20T18:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073797#M308037</link>
      <description>&lt;!--!*#--&gt;OK Jerry, I wrote this for you.  It's about as close as I can get quickly.&lt;BR /&gt;&lt;BR /&gt;$ ./glance_stats&lt;BR /&gt;CPU Util 57% 65% 76%&lt;BR /&gt;Mem Util 84% 84% 84%&lt;BR /&gt;&lt;BR /&gt;It takes about 6 seconds to run, because it REALLY wants to run three iterations.  Although to me, this should only take two seconds.  This is about as tight as I could make it using the "-j 1" and the "-iterations 2" parameters.  Both of these, according the the man page are the minimum.  However, instead of getting two 1 second runs, I seem to get three 2 second runs.  Go figure... &lt;BR /&gt;&lt;BR /&gt;Here's the script file:&lt;BR /&gt;glance -f /var/tmp/glance.$$ -nosort -j 1 -iterations 2 &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &lt;BR /&gt;awk '/CPU  Util|Mem  Util/{print $1" "$2" "$5" "$6" "$7}' \&lt;BR /&gt;   /var/tmp/glance.$$ | tail -2&lt;BR /&gt;rm -f /var/tmp/glance.$$</description>
      <pubDate>Thu, 20 Sep 2007 18:25:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073797#M308037</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2007-09-20T18:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073798#M308038</link>
      <description>nagios does come with precompiled progs for checking the cpu load on the current box.  the command is check_load.  I don't see any precompiled scripts for checking mem on our box.  Have you installed the plugins from &lt;A href="http://nagiosplug.sourceforge.net/" target="_blank"&gt;http://nagiosplug.sourceforge.net/&lt;/A&gt; ?&lt;BR /&gt;&lt;BR /&gt;This is also a great read on how to monitor a remote system with nagios:&lt;BR /&gt;&lt;A href="http://www.crucialwebhost.com/blog/nagios-howto-using-nrpe-to-monitor-remote-services/" target="_blank"&gt;http://www.crucialwebhost.com/blog/nagios-howto-using-nrpe-to-monitor-remote-services/&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;here's an example from our nagios box:&lt;BR /&gt;&lt;BR /&gt;watchman:~# /usr/local/nagios/libexec/check_load -w .8,1.2,1.6 -c 1.0,1.5,2.0&lt;BR /&gt;OK - load average: 0.13, 0.08, 0.02|load1=0.130;0.800;1.000;0; load5=0.080;1.200;1.500;0; load15=0.020;1.600;2.000;0; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;GM</description>
      <pubDate>Thu, 20 Sep 2007 19:03:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073798#M308038</guid>
      <dc:creator>GrayMatter_1</dc:creator>
      <dc:date>2007-09-20T19:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073799#M308039</link>
      <description>John, thanks for the code. But there seems&lt;BR /&gt;to be some kind of race condition. I do not&lt;BR /&gt;get the High on CPU every now and then.&lt;BR /&gt;&lt;BR /&gt;# glance_stats&lt;BR /&gt;CPU Util 9% 9% 9%&lt;BR /&gt;Mem Util 48% 48% 48%&lt;BR /&gt;&lt;BR /&gt;root@dbsvr1  [/lhome]&lt;BR /&gt;# glance_stats&lt;BR /&gt;CPU Util 8% 9% 11%&lt;BR /&gt;Mem Util 48% 48% 48%&lt;BR /&gt;&lt;BR /&gt;root@dbsvr1  [/lhome]&lt;BR /&gt;# glance_stats&lt;BR /&gt;CPU Util 6% 9%&lt;BR /&gt;Mem Util 48% 48% 48%</description>
      <pubDate>Fri, 21 Sep 2007 11:03:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073799#M308039</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2007-09-21T11:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073800#M308040</link>
      <description>Turns out there was a field on CPU that&lt;BR /&gt;did not get populated all the time so&lt;BR /&gt;I changed your code to take care of that&lt;BR /&gt;and I only needed the Avg.&lt;BR /&gt;&lt;BR /&gt;glance -f /var/tmp/glance.cpu -nosort -j 1 -iterations 2 &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;awk -F\| '/CPU  Util/{print $2}' \&lt;BR /&gt;   /var/tmp/glance.cpu | tail -1 | awk '{print $2}'&lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;BR /&gt;I will also look at the links sent.&lt;BR /&gt;There seems to be a lot of locations on&lt;BR /&gt;the web about Nagios and distributions.&lt;BR /&gt;&lt;BR /&gt;Thanks all.</description>
      <pubDate>Fri, 21 Sep 2007 11:47:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073800#M308040</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2007-09-21T11:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073801#M308041</link>
      <description>Assign pts, please</description>
      <pubDate>Fri, 21 Sep 2007 13:27:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073801#M308041</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2007-09-21T13:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073802#M308042</link>
      <description>Jerry,&lt;BR /&gt;&lt;BR /&gt;This will help quite a bit with your problem.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1033211" target="_blank"&gt;https://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1033211&lt;/A&gt;</description>
      <pubDate>Wed, 26 Sep 2007 10:07:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073802#M308042</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2007-09-26T10:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073803#M308043</link>
      <description>My apologies John Joubert for not assigning&lt;BR /&gt;points fast enough for you. &lt;BR /&gt;&lt;BR /&gt;Sometimes I cannot always get back to&lt;BR /&gt;everyone on points immediately. I do go back&lt;BR /&gt;from time to time to place them all but I do&lt;BR /&gt;not have the luxury as do others to have&lt;BR /&gt;such free time when I have to work crisis's here to fix company problems.&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Sep 2007 15:58:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073803#M308043</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2007-09-27T15:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: command to check memory/cpu usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073804#M308044</link>
      <description>Gray, I was not able to find anything&lt;BR /&gt;in referrence to your response:&lt;BR /&gt;&lt;BR /&gt;"nagios does come with precompiled progs for checking the cpu load on the current box. the command is check_load. I don't see any precompiled scripts for checking mem on our box. Have you installed the plugins from &lt;A href="http://nagiosplug.sourceforge.net/" target="_blank"&gt;http://nagiosplug.sourceforge.net/&lt;/A&gt; ?"&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Tue, 16 Oct 2007 14:24:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-to-check-memory-cpu-usage/m-p/4073804#M308044</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2007-10-16T14:24:21Z</dc:date>
    </item>
  </channel>
</rss>

