1833770 Members
2605 Online
110063 Solutions
New Discussion

out of top = junk ?? ..

 
SOLVED
Go to solution
someone_4
Honored Contributor

out of top = junk ?? ..

If I do a top > topout
then more topout it looks like junk.
How can I send this output to look like the top command?

Thanks

Richard
3 REPLIES 3
John Poff
Honored Contributor

Re: out of top = junk ?? ..

Hello Richard,

The top command doesn't play well with sending output to a file. What information are you looking for from top? You can probably grab the same info from the 'ps' command or from MeasureWare.

JP
James R. Ferguson
Acclaimed Contributor
Solution

Re: out of top = junk ?? ..

Hi Richard:

'top' has an undocumented option (-f) for capturing its output into a file that can be read. Do this to capture one screen, for example:

# top -d1 -f /tmp/top.out

Regards!

...JRF...
malki_2
Occasional Advisor

Re: out of top = junk ?? ..

If you redirecte directly a result of top command to topout file you can never see correctly this file.
But you can use -d option of top command to do this
1 top -d 1 > top.out
2 Use a good TERM
3 cat top.out
malki