Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top processes 3

Status
Not open for further replies.

nsew45

MIS
Sep 25, 2001
34
0
0
US
Can anyone direct me to a top processes script like ps -ef sorted by CPU % for use in a vt100 terminal session?
 
if you are using Solaris 8, try run "prstat" command

Hope it helps,

Regards.

Carlos Almeida,
 
in csh ps -auxw The one thing you can't give for your heart's desire is your heart. - Lois McMaster Bujold
 
I have a program called "top" that I run that is very useful and gives all the info you want and more. I know it comes standard on HP-UX and is available for Solaris. Here is a link to get it:

 
As nfaber said, you can get top for your Solaris box, but otherwise try :-
[tt]
#!/bin/sh
############################################################
PS=/bin/ps
CUT=/usr/bin/cut
SORT=/usr/bin/sort
HEAD=/usr/bin/head

if [ -x $PS -a -x $CUT -a -x $SORT -a -x $HEAD ]
then
echo
echo " %CPU PID TIME VSZ USER COMMAND"
echo
$PS -aef -o pcpu= -o pid= -o time= -o vsz= -o user= -o args= |
$CUT -c -130 | $SORT -r | $HEAD -10
else
exit 1
fi
[/tt] TandA

One by one, the penguins steal my sanity.
 
Great information! Thanks for all the helpful response. I'll try them all out and see what works the best for me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top