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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TOP COMMAND NOT WORKING 1

Status
Not open for further replies.

Scunningham99

Programmer
Sep 20, 2001
815
GB
I am probable missing something simple, but when I type in the command "top" from command line using root I get the following error mesg:-

# top
ksh: top: not found



please can anybody out there assist me!!!

 
Sorry, top doesn't come as standard with Solaris. You can get it from however. HTH. Alternatively, use the following script as provided by one of the contributors to these forums, and to whom thanks should go:

#!/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

Cheers.
 
Is top in your korn shell path? Try using the absolute path to top and see if it runs.
 
top should install in /usr/local/bin if it is not there then you will have to install it.
As Ken said sunfreeware is the spot, download it and it gives you a solaris package
you install with pkgadd.
 
Thanks all

problem was really simple as someone had been messing about with .profile for root!!!

PATH= /usr/local/bin: now fixed!!!

thanks again


sy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top