SUMMARY: redirecting top output...

From: Adrian Stovall <AdrianS_at_pfk.com>
Date: Wed Jun 27 2001 - 13:48:59 EDT
I love this list.  The summary is brief, and points to a flaw in my higher
brain function and/or optic nerve.  The key was pointed out in a post from
(no pun intended) Tim Pointing, who quoted from the top man page a detail
that I missed:

>      -dcount
>           Show only count displays, then exit.  A display is con-
>           sidered  to  be  one update of the screen.  This option
>           allows the user to select the  number  of  displays  he
>           wants  to  see  before  top  automatically  exits.  For
>           intelligent terminals, no  upper  limit  is  set.   The
>           default is 1 for dumb terminals.

The last sentence being the important one.  I spent so much time looking for
a switch like "-log", that I didn't see this.

Adeel Khurshid got a little more tricky with his solution:

>	top does'nt like it when it can't figure the TERM setting. Try this
>
>
>	#!/bin/sh
>	TERM=unknown
>	export TERM
>	top > top.out

Thanks to Tim pointing, Adeel Khurshid, Blaine Owens, Joe Fletcher, and
Michael DeSimone for their quick replies.

<----original post follows---->


-----Original Message-----
From: Adrian Stovall [mailto:AdrianS@pfk.com]
Sent: Wednesday, June 27, 2001 11:37 AM
To: Sun Managers Mailing List (E-mail)
Subject: redirecting top output...


I have a (hopefully) simple question.  How can I redirect 
output from top
(3.5beta12 on a Solaris 2.6 box) to a text file?  When I 
attempt a simple
redirection on my Solaris box (/usr/local/bin/top > top.txt), top exits
after the first page is written.  On a redhat linux box (6.2) I have no
problem with this combination, so I was wondering if there is 
some caveat I
am unaware of with top on solaris.

Thanks in advance

"Murphy Was an optomist"
           -O'Toole's commentary on Murpy's Law

"If there are two or more ways to do something, and one of 
those ways can
result in a catastrophe, then someone will do it." 
          -Edward A. Murphy, Jr. 


Adrian M. Stovall
Senior Systems Engineer
PFK Business Systems, Inc.
adrians@pfk.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Jun 27 18:48:59 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:24:58 EDT