<?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: topas in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064944#M734636</link>
    <description>I assume you saw my reply about spacing being your problem, rather than OS version?</description>
    <pubDate>Thu, 06 Sep 2007 02:02:27 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-09-06T02:02:27Z</dc:date>
    <item>
      <title>topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064920#M734606</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I dont really know unix, but sometimes use glance to check the performance of the system, what I need to know is if there is a command to run which will just to pull off the CPU performance to the screen, rather than GUI.&lt;BR /&gt;&lt;BR /&gt;Hope this makes sense.&lt;BR /&gt;&lt;BR /&gt;THanks</description>
      <pubDate>Tue, 04 Sep 2007 06:08:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064920#M734606</guid>
      <dc:creator>Mark Brook_3</dc:creator>
      <dc:date>2007-09-04T06:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064921#M734607</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Topas is the AIX version of top. &lt;BR /&gt;&lt;BR /&gt;# top&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Tue, 04 Sep 2007 06:10:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064921#M734607</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2007-09-04T06:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064922#M734608</link>
      <description>one small from my side..&lt;BR /&gt;top is resource extensive command. &lt;BR /&gt;Please run it using &lt;BR /&gt;nice top&lt;BR /&gt;&lt;BR /&gt;:)</description>
      <pubDate>Tue, 04 Sep 2007 06:50:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064922#M734608</guid>
      <dc:creator>Anshumali</dc:creator>
      <dc:date>2007-09-04T06:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064923#M734609</link>
      <description>Thanks for the replys.  &lt;BR /&gt;&lt;BR /&gt;I may have mis typed my post (sorry)&lt;BR /&gt;&lt;BR /&gt;What I am trying to do is monitor the processor every hour to a flat file.  &lt;BR /&gt;So I can review the next day.&lt;BR /&gt;&lt;BR /&gt;Hope it's explained better this time.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Tue, 04 Sep 2007 07:03:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064923#M734609</guid>
      <dc:creator>Mark Brook_3</dc:creator>
      <dc:date>2007-09-04T07:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064924#M734612</link>
      <description>Hi Mark:&lt;BR /&gt;&lt;BR /&gt;You can collect 'top' output into a file by using the '-f -file' switch and argument with 'top':&lt;BR /&gt;&lt;BR /&gt;# top -s 3600 -f /tmp/topoutput&lt;BR /&gt;&lt;BR /&gt;...would snapshot every 3600 seconds to the file "/tmp/topoutput".&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 04 Sep 2007 07:08:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064924#M734612</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-09-04T07:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064925#M734617</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;No problem!&lt;BR /&gt;&lt;BR /&gt;heck the root's crontab for the lines containing sa1 and sa2 eg.&lt;BR /&gt;&lt;BR /&gt;* * * * /usr/lbin/sa/sa1 1200 3&lt;BR /&gt;0 0 * * * /usr/lbin/sa/sa2 -s 00:00 -e 23:45 -1 3600 -A&lt;BR /&gt;&lt;BR /&gt;run the sar command&lt;BR /&gt;&lt;BR /&gt;# sar&lt;BR /&gt;00:00:00    %usr    %sys    %wio   %idle&lt;BR /&gt;00:10:00       0       1       1      98&lt;BR /&gt;00:20:00       0       1       1      98&lt;BR /&gt;00:30:00       0       1       1      98&lt;BR /&gt;00:40:00       0       1       1      98&lt;BR /&gt;00:50:00       0       1       1      98&lt;BR /&gt;01:00:00       0       1       1      98&lt;BR /&gt;01:10:00       0       1       1      98&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Tue, 04 Sep 2007 07:12:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064925#M734617</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2007-09-04T07:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064926#M734618</link>
      <description>Thanks again.   &lt;BR /&gt;&lt;BR /&gt;One last question now sorry if it's dragging on. &lt;BR /&gt;&lt;BR /&gt;What I am trying to do is be alerted to a file when the CPU is less than 70% idle.&lt;BR /&gt;&lt;BR /&gt;What I have done with your help and someone at work is&lt;BR /&gt;&lt;BR /&gt;sar 1 1 &amp;gt; filename.txt&lt;BR /&gt;got the following&lt;BR /&gt;14:07:49       1       1       0      98&lt;BR /&gt;then&lt;BR /&gt;cut -c39-40 filename |tail -1 &amp;gt; filename2.txt&lt;BR /&gt;which then contains&lt;BR /&gt;98&lt;BR /&gt;&lt;BR /&gt;The question is then how do I create a text file if the figure in the file is less than 70.&lt;BR /&gt;&lt;BR /&gt;Hope you can help.&lt;BR /&gt;&lt;BR /&gt;Again sorry for it dragging on.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Sep 2007 08:14:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064926#M734618</guid>
      <dc:creator>Mark Brook_3</dc:creator>
      <dc:date>2007-09-04T08:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064927#M734619</link>
      <description>Maybe something like this in a script ?&lt;BR /&gt;&lt;BR /&gt;LOAD=$(sar 1 1 | tail -n 1)&lt;BR /&gt;IDLE=$(echo $LOAD | cut -d " " -f 5)&lt;BR /&gt;if [ $IDLE -lt 70 ]&lt;BR /&gt;then&lt;BR /&gt;echo "$LOAD" &amp;gt;&amp;gt; /path/to/cpu_logile.log&lt;BR /&gt;fi</description>
      <pubDate>Tue, 04 Sep 2007 08:25:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064927#M734619</guid>
      <dc:creator>Wim Rombauts</dc:creator>
      <dc:date>2007-09-04T08:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064928#M734620</link>
      <description>Thank you that works till a point.  My scripting isnt too good.&lt;BR /&gt;&lt;BR /&gt;I get an error&lt;BR /&gt;&lt;BR /&gt;/sarwatch.txt[5]: [81:  not found.&lt;BR /&gt;&lt;BR /&gt;which appears when it gets to the if statment.&lt;BR /&gt;&lt;BR /&gt;LOAD=$(sar 1 1 | tail -n 1)&lt;BR /&gt;IDLE=$(echo $LOAD | cut -d " " -f 5)&lt;BR /&gt;if [ $IDLE -lt 70 ]&lt;BR /&gt;then&lt;BR /&gt;echo "$LOAD" &amp;gt;&amp;gt; /path/to/cpu_logile.log&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Tue, 04 Sep 2007 09:04:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064928#M734620</guid>
      <dc:creator>Mark Brook_3</dc:creator>
      <dc:date>2007-09-04T09:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064929#M734621</link>
      <description>&amp;gt;I get an error&lt;BR /&gt;/sarwatch.txt[5]: [81: not found.&lt;BR /&gt;&lt;BR /&gt;This means your cut didn't work and it has a "[" in the field?&lt;BR /&gt;&lt;BR /&gt;LOAD=$(sar 1 1 | tail -n 1)&lt;BR /&gt;IDLE=$(echo $LOAD | cut -d " " -f 5)&lt;BR /&gt;if [ $IDLE -lt 70 ]&lt;BR /&gt;&lt;BR /&gt;If you don't use LOAD anywhere else, you could just pass the sar output directly to awk.  awk has a more usable interface to select fields.  cut(1) would treat each space as a delimiter, even if two in a row.&lt;BR /&gt;&lt;BR /&gt;If you quoted "$IDLE" above, you wouldn't get that "not found" error but you wouldn't know your script was broken:&lt;BR /&gt;if [ "$IDLE" -lt 70 ]; then</description>
      <pubDate>Tue, 04 Sep 2007 11:51:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064929#M734621</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-04T11:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064930#M734622</link>
      <description>What happens if you execute the commands one by one on the shell prompt ?&lt;BR /&gt;&lt;BR /&gt;LOAD=$(sar 1 1 | tail -n 1)&lt;BR /&gt;echo $LOAD&lt;BR /&gt;IDLE=$(echo $LOAD | cut -d " " -f 5)&lt;BR /&gt;echo $IDLE&lt;BR /&gt;&lt;BR /&gt;End then :&lt;BR /&gt;&lt;BR /&gt;if [ $IDLE -lt 70 ]&lt;BR /&gt;then&lt;BR /&gt;echo "less then 70"&lt;BR /&gt;else&lt;BR /&gt;echo "more then 70"&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Sep 2007 01:35:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064930#M734622</guid>
      <dc:creator>Wim Rombauts</dc:creator>
      <dc:date>2007-09-05T01:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064931#M734623</link>
      <description>&lt;BR /&gt;Thanks everyone&lt;BR /&gt;&lt;BR /&gt;I have typed in the commands manually can get the following. &lt;BR /&gt; LOAD=$(sar 1 1 | tail -n 1)&lt;BR /&gt;echo $LOAD&lt;BR /&gt;07:39:51 53 13 25 9&lt;BR /&gt; IDLE=$(echo $LOAD | cut -d " " -f 5)&lt;BR /&gt; echo $IDLE&lt;BR /&gt;9&lt;BR /&gt;&lt;BR /&gt;however when I type in the if statment it goes to a different prompt &amp;gt; &lt;BR /&gt;$ if [ $IDLE -lt 70 ]&lt;BR /&gt;&amp;gt; then&lt;BR /&gt;&amp;gt; echo "less then 70"&lt;BR /&gt;&amp;gt; else&lt;BR /&gt;&amp;gt; echo "more then 70"&lt;BR /&gt;&amp;gt; fi&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Sep 2007 02:00:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064931#M734623</guid>
      <dc:creator>Mark Brook_3</dc:creator>
      <dc:date>2007-09-05T02:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064932#M734624</link>
      <description>The different prompt is normal, since the shell cannot execute the first line of the if-statement alone, it needs all commands until the "fi" to complete the command.&lt;BR /&gt;As long as you type no "fi", you will keep receiving the "&amp;gt;" prompt.&lt;BR /&gt;&lt;BR /&gt;Did the if command return a "less than 70" output ?</description>
      <pubDate>Wed, 05 Sep 2007 02:08:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064932#M734624</guid>
      <dc:creator>Wim Rombauts</dc:creator>
      <dc:date>2007-09-05T02:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064933#M734625</link>
      <description>Thanks&lt;BR /&gt;&lt;BR /&gt;No it didnt echo anything&lt;BR /&gt;$ if [ $IDLE -lt 70 ]&lt;BR /&gt;&amp;gt; then&lt;BR /&gt;&amp;gt; echo "less then 70"&lt;BR /&gt;&amp;gt; else&lt;BR /&gt;&amp;gt; echo "more then 70"&lt;BR /&gt;&amp;gt; fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Sep 2007 02:22:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064933#M734625</guid>
      <dc:creator>Mark Brook_3</dc:creator>
      <dc:date>2007-09-05T02:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064934#M734626</link>
      <description>Strange, it should echo something ...&lt;BR /&gt;When I enter :&lt;BR /&gt;$ IDLE=66&lt;BR /&gt;$ if [ $IDLE -eq 66 ]&lt;BR /&gt;&amp;gt; then&lt;BR /&gt;&amp;gt; echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&lt;BR /&gt;&amp;gt; fi&lt;BR /&gt;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;Whatever if-statement you write, it should execute the 'then' OR the 'else' and both contain an echo command, so there should be output allways.&lt;BR /&gt;&lt;BR /&gt;At the other hand : If you cut and paste the commands that you typed manually into a script and execute the script, does it still return an error as before ? Since the individual commands work, they should also work in a script.</description>
      <pubDate>Wed, 05 Sep 2007 02:44:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064934#M734626</guid>
      <dc:creator>Wim Rombauts</dc:creator>
      <dc:date>2007-09-05T02:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064935#M734627</link>
      <description>Sorry for been a pain.&lt;BR /&gt;&lt;BR /&gt;The scriptLOAD=$(sar 1 1 | tail -n 1)&lt;BR /&gt;echo $LOAD&lt;BR /&gt;IDLE=$(echo $LOAD | cut -d " " -f5)&lt;BR /&gt;echo $IDLE&lt;BR /&gt;if [$IDLE -lt 70] then&lt;BR /&gt;echo $LOAD&lt;BR /&gt;else&lt;BR /&gt;echo "more than 70"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;The output08:57:34 22 7 36 36&lt;BR /&gt;36&lt;BR /&gt;/sarwatch.txt[5]: Syntax error at line 8 : `else' is not expected.&lt;BR /&gt;&lt;BR /&gt;It's doing my head in now..........&lt;BR /&gt;&lt;BR /&gt;THanks&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Sep 2007 03:01:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064935#M734627</guid>
      <dc:creator>Mark Brook_3</dc:creator>
      <dc:date>2007-09-05T03:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064936#M734628</link>
      <description>You need to put the "then" on a new line, that is the reason for the error.</description>
      <pubDate>Wed, 05 Sep 2007 04:54:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064936#M734628</guid>
      <dc:creator>Wim Rombauts</dc:creator>
      <dc:date>2007-09-05T04:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064937#M734629</link>
      <description>Thanks.  &lt;BR /&gt;&lt;BR /&gt;The results are now&lt;BR /&gt;&lt;BR /&gt;11:10:34 0 1 6 93&lt;BR /&gt;93&lt;BR /&gt;/sarwatch.txt[5]: [93:  not found.&lt;BR /&gt;more than 70&lt;BR /&gt;&lt;BR /&gt;Which it's reporting its more than 70 now, but still get the not found bit.&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Wed, 05 Sep 2007 05:14:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064937#M734629</guid>
      <dc:creator>Mark Brook_3</dc:creator>
      <dc:date>2007-09-05T05:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064938#M734630</link>
      <description>Thanks everyone.&lt;BR /&gt;&lt;BR /&gt;Got it to work.  &lt;BR /&gt;&lt;BR /&gt;the -lt 70 needed to be a variable.&lt;BR /&gt;&lt;BR /&gt;ie &lt;BR /&gt;&lt;BR /&gt;   1  LOAD=$(sar 1 1 | tail -n 1)&lt;BR /&gt;     2  IDLE=$(echo $LOAD | cut -d " " -f5) &amp;gt;/dev/null&lt;BR /&gt;     3  VAR1=10&lt;BR /&gt;     4  echo $IDLE&lt;BR /&gt;     5  if [ $IDLE -lt $VAR1 ] ; then&lt;BR /&gt;     6     echo "less than"&lt;BR /&gt;     7  else&lt;BR /&gt;     8     echo "more than 70"&lt;BR /&gt;     9  fi&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Sep 2007 06:43:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064938#M734630</guid>
      <dc:creator>Mark Brook_3</dc:creator>
      <dc:date>2007-09-05T06:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: topas</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064939#M734631</link>
      <description>Strange, I think you have an issue in your shell.&lt;BR /&gt;On my system "if [ $IDLE -lt 70 ]" works fine.&lt;BR /&gt;What is your OS-version and what shell are you working in (I am using sh on HP-UX 11i v2, the default posix-shell on HPUX)? And what is your patch level of the shell (swlist -l product | grep PHCO | grep sh) ? I have PHCO_32444 fo sh-posix.</description>
      <pubDate>Wed, 05 Sep 2007 07:08:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/topas/m-p/4064939#M734631</guid>
      <dc:creator>Wim Rombauts</dc:creator>
      <dc:date>2007-09-05T07:08:49Z</dc:date>
    </item>
  </channel>
</rss>

