<?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: %use cpu %use memory and swap in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/use-cpu-use-memory-and-swap/m-p/4110375#M92663</link>
    <description>You are asking for which OS, if unix which flavour,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am sending some information for &lt;BR /&gt;(1) HPUX&lt;BR /&gt;(a) %CPU : /usr/sbin/sar -u 1 10 | awk '/Average/ { print ( $2 + $3 ) }'&lt;BR /&gt;(b) %Memory : &lt;BR /&gt;&lt;BR /&gt;#Memory.sh&lt;BR /&gt;PROGNAME=`basename $0`&lt;BR /&gt;TMP_FILE=/tmp/$PROGNAME.$$&lt;BR /&gt;GLANCE=/opt/perf/bin/glance&lt;BR /&gt;&lt;BR /&gt;trap "rm -f ${TMP_FILE}" 1 2 3 15&lt;BR /&gt;if [ $# != 1 ]&lt;BR /&gt;then&lt;BR /&gt;        echo "USAGE : ${PROGNAME} monitor_name"&lt;BR /&gt;        exit 1&lt;BR /&gt;else&lt;BR /&gt;        MON_NAME=$1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;echo "${GLANCE} -f ${TMP_FILE} -maxpages 1 -command -iterations 1 1&amp;gt;/dev/null"&lt;BR /&gt;${GLANCE} -f ${TMP_FILE} -maxpages 1 -command -iterations 1 1&amp;gt;/dev/null&lt;BR /&gt;MemUtil=`cat ${TMP_FILE} | grep Mem | awk '{print $6}' | awk -F% '{print $1}'`&lt;BR /&gt;&lt;BR /&gt;Count=0&lt;BR /&gt;TotalMemUtil=0&lt;BR /&gt;for MemUtilVal in $MemUtil&lt;BR /&gt;do&lt;BR /&gt;        TotalMemUtil=`expr ${TotalMemUtil} + ${MemUtilVal}`&lt;BR /&gt;        Count=`expr $Count + 1`&lt;BR /&gt;done&lt;BR /&gt;CalculatedMemUtil=`expr $TotalMemUtil / $Count`&lt;BR /&gt;#echo $CalculatedMemUtil&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(c) %SWAP : /etc/swapinfo -t | grep '^total' | awk '{ print $5 }' | sed -e 's/\%//g'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you want for windows, or other flavour of unix like AIX, SunOS or Linux let me write.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;-NKG-</description>
    <pubDate>Tue, 04 Dec 2007 04:28:10 GMT</pubDate>
    <dc:creator>Nitin Kumar Gupta</dc:creator>
    <dc:date>2007-12-04T04:28:10Z</dc:date>
    <item>
      <title>%use cpu %use memory and swap</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-cpu-use-memory-and-swap/m-p/4110373#M92661</link>
      <description>Gurus Do you have any shell for generate file with information about %use cpu %use memory and swap?&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Nov 2007 12:59:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-cpu-use-memory-and-swap/m-p/4110373#M92661</guid>
      <dc:creator>Muguerza</dc:creator>
      <dc:date>2007-11-30T12:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: %use cpu %use memory and swap</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-cpu-use-memory-and-swap/m-p/4110374#M92662</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You can parse the output of 'sar -u' and 'swapinfo -tam'.&lt;BR /&gt;&lt;BR /&gt;See the manpages for 'sar(1M)' and 'swapinfo(1M)'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sat, 01 Dec 2007 08:44:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-cpu-use-memory-and-swap/m-p/4110374#M92662</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-12-01T08:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: %use cpu %use memory and swap</title>
      <link>https://community.hpe.com/t5/operating-system-linux/use-cpu-use-memory-and-swap/m-p/4110375#M92663</link>
      <description>You are asking for which OS, if unix which flavour,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am sending some information for &lt;BR /&gt;(1) HPUX&lt;BR /&gt;(a) %CPU : /usr/sbin/sar -u 1 10 | awk '/Average/ { print ( $2 + $3 ) }'&lt;BR /&gt;(b) %Memory : &lt;BR /&gt;&lt;BR /&gt;#Memory.sh&lt;BR /&gt;PROGNAME=`basename $0`&lt;BR /&gt;TMP_FILE=/tmp/$PROGNAME.$$&lt;BR /&gt;GLANCE=/opt/perf/bin/glance&lt;BR /&gt;&lt;BR /&gt;trap "rm -f ${TMP_FILE}" 1 2 3 15&lt;BR /&gt;if [ $# != 1 ]&lt;BR /&gt;then&lt;BR /&gt;        echo "USAGE : ${PROGNAME} monitor_name"&lt;BR /&gt;        exit 1&lt;BR /&gt;else&lt;BR /&gt;        MON_NAME=$1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;echo "${GLANCE} -f ${TMP_FILE} -maxpages 1 -command -iterations 1 1&amp;gt;/dev/null"&lt;BR /&gt;${GLANCE} -f ${TMP_FILE} -maxpages 1 -command -iterations 1 1&amp;gt;/dev/null&lt;BR /&gt;MemUtil=`cat ${TMP_FILE} | grep Mem | awk '{print $6}' | awk -F% '{print $1}'`&lt;BR /&gt;&lt;BR /&gt;Count=0&lt;BR /&gt;TotalMemUtil=0&lt;BR /&gt;for MemUtilVal in $MemUtil&lt;BR /&gt;do&lt;BR /&gt;        TotalMemUtil=`expr ${TotalMemUtil} + ${MemUtilVal}`&lt;BR /&gt;        Count=`expr $Count + 1`&lt;BR /&gt;done&lt;BR /&gt;CalculatedMemUtil=`expr $TotalMemUtil / $Count`&lt;BR /&gt;#echo $CalculatedMemUtil&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(c) %SWAP : /etc/swapinfo -t | grep '^total' | awk '{ print $5 }' | sed -e 's/\%//g'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you want for windows, or other flavour of unix like AIX, SunOS or Linux let me write.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;-NKG-</description>
      <pubDate>Tue, 04 Dec 2007 04:28:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/use-cpu-use-memory-and-swap/m-p/4110375#M92663</guid>
      <dc:creator>Nitin Kumar Gupta</dc:creator>
      <dc:date>2007-12-04T04:28:10Z</dc:date>
    </item>
  </channel>
</rss>

