Output top to file

Hi,

I've installed SMCtop on to a Solaris 9 sparc server and I am trying to capture the output of top to a file without success. The version of top I have installed is top-3.6.1-sol9-sparc-local.gz. All my attempts are below.

# /usr/local/bin/top -d 5 -f /tmp/top.out
/usr/local/bin/top: illegal option -- f
Top version 3.6.1
 
# /usr/local/bin/top -f /tmp/topout
/usr/local/bin/top: illegal option -- f
Top version 3.6.1
 
# echo `/usr/local/bin/top -n1` >> top.out
/usr/local/bin/top: illegal option -- 1
Top version 3.6.1

Thanks,

Sparcman

/usr/local/bin/top -d 5 > /tmp/top.out

If you have "man top" there is no "-f" option.
Also, "-n" option is about number of processes to display.

1 Like

Two suggestions.

1/ Learn prstat.
2/ Perhaps consider System Activity Reporter or sar if you need to look at historical data.

If you need more tools to extract and view performance data, check out Orca and the SEToolkit.

hth.

Hi,

Simplest way to get usage percentages of process in to a file is

ps -eo pcpu,pmem,pid,ppid,args >processlist

However top works non-interactively with -b option

top -b -n1 > myfile

Regards
Srinivas Masetty