<?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: A script help for cat top information in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718214#M62409</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;I try to edit a shell like this:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh &lt;BR /&gt;while true &lt;BR /&gt;do &lt;BR /&gt;echo "-----------------------" &lt;BR /&gt;top -d 1 | egrep 'Memory|System|avg' &lt;BR /&gt;sleep 10&lt;BR /&gt;clear &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And then try run and spool to log:&lt;BR /&gt;. top5 &amp;gt;&amp;gt; top5.log&lt;BR /&gt;&lt;BR /&gt;But the top5.log is :&lt;BR /&gt;&lt;BR /&gt;[?25h [m [H [J 7 [1;24r 8 [4lSystem: gbm2 [42CTue May  7 12:20:33 2002&lt;BR /&gt;avg   0.40   2.0%   0.0%   1.0%  97.0%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt;Memory: 3365496K (621808K) real, 3140932K (575240K) virtual, 1940580K free  Page&lt;BR /&gt; [H [J-------------------------------------------------&lt;BR /&gt; [?25h [m [H [J 7 [1;24r 8 [4lSystem: gbm2 [42CTue May  7 12:20:44 2002&lt;BR /&gt;avg   0.37  23.0%   0.0%  19.0%  58.0%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt;Memory: 3365992K (560664K) real, 3142028K (506684K) virtual, 1940036K free  Page&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can you teach me how to discard those marks?&lt;BR /&gt;[m,[H......&lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;Violin.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 07 May 2002 03:19:34 GMT</pubDate>
    <dc:creator>violin</dc:creator>
    <dc:date>2002-05-07T03:19:34Z</dc:date>
    <item>
      <title>A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718208#M62403</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;We want to monitor top info about every 5 mins.&lt;BR /&gt;in hp-ux, top command will give info like this:&lt;BR /&gt;System: gbm2                                          Tue May  7 11:09:21 2002&lt;BR /&gt;Load averages: 1.86, 1.99, 2.23&lt;BR /&gt;599 processes: 590 sleeping, 9 running&lt;BR /&gt;Cpu states:&lt;BR /&gt;CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS&lt;BR /&gt; 0    2.10  73.2%   0.0%  10.4%  16.3%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt; 1    1.92  69.1%   0.0%  12.6%  18.3%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt; 2    1.45  60.4%   0.0%  13.6%  26.0%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt; 3    1.98  75.6%   0.0%   5.5%  18.9%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt;---   ----  -----  -----  -----  -----  -----  -----  -----  -----&lt;BR /&gt;avg   1.86  69.7%   0.0%  10.4%  19.9%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt;&lt;BR /&gt;Memory: 4234240K (1405072K) real, 3909564K (1203124K) virtual, 1066808K free  Pa&lt;BR /&gt;ge# 1/67&lt;BR /&gt;&lt;BR /&gt;CPU TTY     PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND&lt;BR /&gt; 0   ?    25550 erpmgr   235 20 27240K 10960K run      0:07 19.26 19.23 f60webmx&lt;BR /&gt; 2   ?    10798 erpmgr   148 20 48376K 34240K sleep    1:49 14.18 14.16 f60webmx&lt;BR /&gt; 1   ?    25116 erpmgr   154 20 32504K 16600K sleep    0:13  9.06  9.05 f60webmx&lt;BR /&gt; 0   ?    10638 oraerp   148 20 34596K  6144K sleep    0:52  8.96  8.95 oraclePR&lt;BR /&gt; 2   ?    21403 erpmgr   154 20 33176K 17460K sleep    0:29  8.76  8.74 f60webmx&lt;BR /&gt; 2   ?    13572 erpmgr   216 20 39560K 24264K run      2:59  8.24  8.22 f60webmx&lt;BR /&gt; 2 pts/ta 25801 oraerp   154 20  1056K  2852K sleep    0:02 21.80  7.90 vi&lt;BR /&gt; 1   ?    25252 erpmgr   154 20 28904K 13536K sleep    0:07  7.01  6.99 f60webm&lt;BR /&gt;&lt;BR /&gt;Please help me how to print 1st , 11th and 13th lines,&lt;BR /&gt;like this:&lt;BR /&gt;System: gbm2                                          Tue May  7 11:09:21 2002&lt;BR /&gt;avg   1.86  69.7%   0.0%  10.4%  19.9%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt;Memory: 4234240K (1405072K) real, 3909564K (1203124K) virtual, 1066808K free  Page# 1/67&lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;Violin.&lt;BR /&gt;</description>
      <pubDate>Tue, 07 May 2002 02:12:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718208#M62403</guid>
      <dc:creator>violin</dc:creator>
      <dc:date>2002-05-07T02:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718209#M62404</link>
      <description>Try this:&lt;BR /&gt;top -d 1 | egrep 'Memory|System' &lt;BR /&gt;</description>
      <pubDate>Tue, 07 May 2002 02:22:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718209#M62404</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-05-07T02:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718210#M62405</link>
      <description>And here's teh script to monitor it every 5 minutes:&lt;BR /&gt;&lt;BR /&gt;while true                         &lt;BR /&gt;do                                 &lt;BR /&gt;top -d 1 | egrep 'Memory|System'   &lt;BR /&gt;sleep 10                           &lt;BR /&gt;clear                              &lt;BR /&gt;done                               &lt;BR /&gt;</description>
      <pubDate>Tue, 07 May 2002 02:26:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718210#M62405</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-05-07T02:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718211#M62406</link>
      <description>oops..missed out the "avg".&lt;BR /&gt;egrep 'Memory|System|avg'</description>
      <pubDate>Tue, 07 May 2002 02:29:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718211#M62406</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-05-07T02:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718212#M62407</link>
      <description>small script&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;top -f /tmp/top.out&lt;BR /&gt;echo " ========================="&lt;BR /&gt;grep ^Memory /tmp/top.out&lt;BR /&gt;grep ^avg /tmp/top.out&lt;BR /&gt;echo " ============================"&lt;BR /&gt;&lt;BR /&gt;# End&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Niraj</description>
      <pubDate>Tue, 07 May 2002 02:51:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718212#M62407</guid>
      <dc:creator>Niraj Kumar Verma</dc:creator>
      <dc:date>2002-05-07T02:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718213#M62408</link>
      <description>Another option would be to use the scripts above but use cron to call the script every 5 minutes.&lt;BR /&gt;&lt;BR /&gt;Cheers John</description>
      <pubDate>Tue, 07 May 2002 02:53:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718213#M62408</guid>
      <dc:creator>John McWilliams</dc:creator>
      <dc:date>2002-05-07T02:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718214#M62409</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;I try to edit a shell like this:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh &lt;BR /&gt;while true &lt;BR /&gt;do &lt;BR /&gt;echo "-----------------------" &lt;BR /&gt;top -d 1 | egrep 'Memory|System|avg' &lt;BR /&gt;sleep 10&lt;BR /&gt;clear &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And then try run and spool to log:&lt;BR /&gt;. top5 &amp;gt;&amp;gt; top5.log&lt;BR /&gt;&lt;BR /&gt;But the top5.log is :&lt;BR /&gt;&lt;BR /&gt;[?25h [m [H [J 7 [1;24r 8 [4lSystem: gbm2 [42CTue May  7 12:20:33 2002&lt;BR /&gt;avg   0.40   2.0%   0.0%   1.0%  97.0%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt;Memory: 3365496K (621808K) real, 3140932K (575240K) virtual, 1940580K free  Page&lt;BR /&gt; [H [J-------------------------------------------------&lt;BR /&gt; [?25h [m [H [J 7 [1;24r 8 [4lSystem: gbm2 [42CTue May  7 12:20:44 2002&lt;BR /&gt;avg   0.37  23.0%   0.0%  19.0%  58.0%   0.0%   0.0%   0.0%   0.0%&lt;BR /&gt;Memory: 3365992K (560664K) real, 3142028K (506684K) virtual, 1940036K free  Page&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can you teach me how to discard those marks?&lt;BR /&gt;[m,[H......&lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;Violin.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 May 2002 03:19:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718214#M62409</guid>
      <dc:creator>violin</dc:creator>
      <dc:date>2002-05-07T03:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718215#M62410</link>
      <description>Do a little modification in your script &lt;BR /&gt;&lt;BR /&gt;#!/bin/sh &lt;BR /&gt;while true &lt;BR /&gt;do &lt;BR /&gt;echo "-----------------------" &lt;BR /&gt;top -f top.out &lt;BR /&gt;cat top.out |egrep '^Memory|^System|^avg' &lt;BR /&gt;sleep 10 &lt;BR /&gt;clear &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Niraj</description>
      <pubDate>Tue, 07 May 2002 03:43:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718215#M62410</guid>
      <dc:creator>Niraj Kumar Verma</dc:creator>
      <dc:date>2002-05-07T03:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718216#M62411</link>
      <description>Thanks for Niraj,&lt;BR /&gt;&lt;BR /&gt;your script really works,&lt;BR /&gt;but another question again,&lt;BR /&gt;IF I want to execute this script after boot,&lt;BR /&gt;how can I do for this?&lt;BR /&gt;&lt;BR /&gt;Sorry I'm not so familiar with HP-UX.&lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;Violin.</description>
      <pubDate>Tue, 07 May 2002 04:29:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718216#M62411</guid>
      <dc:creator>violin</dc:creator>
      <dc:date>2002-05-07T04:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: A script help for cat top information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718217#M62412</link>
      <description>you need to have a startup script in &lt;BR /&gt;&lt;BR /&gt;/sbin/init.d/*&lt;BR /&gt;&lt;BR /&gt;and proper link to respective rc directory&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;-Niraj&lt;BR /&gt;</description>
      <pubDate>Tue, 07 May 2002 04:49:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-help-for-cat-top-information/m-p/2718217#M62412</guid>
      <dc:creator>Niraj Kumar Verma</dc:creator>
      <dc:date>2002-05-07T04:49:04Z</dc:date>
    </item>
  </channel>
</rss>

