Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
cancel
Showing results for 
Search instead for 
Did you mean: 

Top utility

Bruno Pina
Occasional Advisor

Top utility

Hi,
I have one server ES40 running Tru64 version 5.1B.

I only can run top utility as root.

My top utility version is 3.4. Someone can tell me how to run top as another user?

Thanks.
4 REPLIES
Steven Schweda
Honored Contributor

Re: Top utility

Make sure (chown) that "root" owns the
executable, and set (chmod) its setuid bit?
Steven Schweda
Honored Contributor

Re: Top utility

Hey. Sure enough.

urtx> top
/dev/kmem: Permission denied

(Look! An actual command with an actual
error message! It _is_ possible!)

urtx> who am i
sms pts/2 Mar 12 12:03 (alp.antinode.org)

urtx> type top
top is /usr/local/bin/top

urtx# ls -l /usr/local/bin/top
-rwxr-xr-x 1 root system 322544 May 9 2007 /usr/local/bin/top

urtx# chmod u+s /usr/local/bin/top

urtx# ls -l /usr/local/bin/top
-rwsr-xr-x 1 root system 322544 May 9 2007 /usr/local/bin/top

urtx> top

load averages: 0.01, 0.00, 0.00; 12:17:02
86 processes: 1 running, 22 sleeping, 63 idle
CPU states: 0.0% user, 0.0% nice, 1.8% system, 0.0% wio, 97.9% idle
Memory: 131M active, 1977M total, 1729M free
Swap: 8K in use, 3096M total
[...]
Steven Schweda
Honored Contributor

Re: Top utility

> My top utility version is 3.4.

Version 3.7 seems to be current.

http://www.unixtop.org/

Building it with a non-GCC compiler seems to
require some extra effort. (I gave up, and
did it the easy way.)
Kapil Jha
Honored Contributor

Re: Top utility

Hello ,
Aprt from what stevan has said , if u have sudo configured u can always do
sudo /usr/local/bin/top

;)

BR,
Kapil
I am in this small bowl, I wane see the real world......