<?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: Script Required in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-required/m-p/5001883#M424593</link>
    <description>sar -uM 1 4|grep 'Average   system' | awk '{printf "%d %s\n",(100-$NF),"%"}'&lt;BR /&gt;vmstat 1 4|awk '{print $5}'|grep -v '[a-zA-Z]'|awk '{(s+=$1)} END {printf "%d %s\n",s*4096/1024,MB}'&lt;BR /&gt;&lt;BR /&gt;Down and dirty though.</description>
    <pubDate>Fri, 08 Sep 2006 02:09:30 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2006-09-08T02:09:30Z</dc:date>
    <item>
      <title>Script Required</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-required/m-p/5001882#M424592</link>
      <description>Hi All,&lt;BR /&gt;We need script for % of cpu and free memory.&lt;BR /&gt;1.sar -uM 1 1&lt;BR /&gt;vvc1app2@root&amp;gt;sar -uM 2 2&lt;BR /&gt;HP-UX vvc1app2 B.11.11 U 9000/800    09/08/06&lt;BR /&gt; &lt;BR /&gt;12:02:56     cpu    %usr    %sys    %wio   %idle&lt;BR /&gt;12:03:01       0       0       0       0     100&lt;BR /&gt;               1       1       0       0      99&lt;BR /&gt;               2       0       1       0      99&lt;BR /&gt;               3      11       1       0      89&lt;BR /&gt;          system       3       1       0      97&lt;BR /&gt; 12:03:21       0       0       0       0     100&lt;BR /&gt;               1       0       0       0     100&lt;BR /&gt;               2       0       0       0     100&lt;BR /&gt;               3       0       0       1      99&lt;BR /&gt;          system       0       0       0     100&lt;BR /&gt; &lt;BR /&gt;Average        0       1       1       1      98&lt;BR /&gt;Average        1       3       1       0      97&lt;BR /&gt;Average        2       0       1       1      98&lt;BR /&gt;Average        3       5       1       0      93&lt;BR /&gt;Average   system       2       1       0      97&lt;BR /&gt;&lt;BR /&gt;2.app2@root&amp;gt;vmstat&lt;BR /&gt;         procs           memory                   page                              faults       cpu&lt;BR /&gt;    r     b     w      avm    free   re   at    pi   po    fr   de    sr     in     sy    cs  us sy id&lt;BR /&gt;    1     0     0   188372  3379377  107   16     0    0     0    0     0   1057   1540   139   0  1 99&lt;BR /&gt;&lt;BR /&gt;Requirement:&lt;BR /&gt;1.In sar -uM 5 5 command output ,the last line gives the aveage % idle for cpu i.e 97%.If we will subtract from 100%,it will give % of CPU used i.e 3%(100 -97 =3%).We need this output i.e % of CPU used, in single script .&lt;BR /&gt;2.In vmstat command ouput,the free memory is 3379377 KB.If we will multiply by 4, it will give free memory in KB,after that we will divide by 1024 it will give in MB and again divide by 1024 it will give in GB.We need out put in GB only in single script.&lt;BR /&gt;&lt;BR /&gt;The above two requirement is required in single script.Pls give the script for the above requirement.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Suresh.</description>
      <pubDate>Fri, 08 Sep 2006 01:56:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-required/m-p/5001882#M424592</guid>
      <dc:creator>M.sureshkumar</dc:creator>
      <dc:date>2006-09-08T01:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Script Required</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-required/m-p/5001883#M424593</link>
      <description>sar -uM 1 4|grep 'Average   system' | awk '{printf "%d %s\n",(100-$NF),"%"}'&lt;BR /&gt;vmstat 1 4|awk '{print $5}'|grep -v '[a-zA-Z]'|awk '{(s+=$1)} END {printf "%d %s\n",s*4096/1024,MB}'&lt;BR /&gt;&lt;BR /&gt;Down and dirty though.</description>
      <pubDate>Fri, 08 Sep 2006 02:09:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-required/m-p/5001883#M424593</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-09-08T02:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script Required</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-required/m-p/5001884#M424594</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;a modified/simplified version (note for printf:&lt;BR /&gt;%% -&amp;gt; %):&lt;BR /&gt;&lt;BR /&gt;sar -uM 1 4 | awk '/Average system/ {printf("%d%%s\n",100-$NF)}'&lt;BR /&gt;&lt;BR /&gt;vmstat | awk '/^ *[0-9]/ {printf("%dGB\n",$5/256/1024)}'&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Sep 2006 06:07:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-required/m-p/5001884#M424594</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-09-08T06:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script Required</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-required/m-p/5001885#M424595</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;Thank you for ur given input.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Suresh.</description>
      <pubDate>Sat, 09 Sep 2006 00:27:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-required/m-p/5001885#M424595</guid>
      <dc:creator>M.sureshkumar</dc:creator>
      <dc:date>2006-09-09T00:27:12Z</dc:date>
    </item>
  </channel>
</rss>

