1844096 Members
2496 Online
110227 Solutions
New Discussion

different types of ps

 
SOLVED
Go to solution
Shivkumar
Super Advisor

different types of ps

Hi,

What is the difference between /usr/bin/ps and /usr/ucb/ps ?

What are their specific uses ?

Thanks,
Shiv
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor
Solution

Re: different types of ps

Hi SHiv:

Solaris, perhaps? See here:

http://www.uwsg.iu.edu/UAU/navigate/whichwhereis.html

Regards!

...JRF...
vinod_25
Valued Contributor

Re: different types of ps

Hi shiv,

UCB is Berkley version of commands...

and as far i know Solaris supports ucb.

Assign points...

regds
Vinod
Victor BERRIDGE
Honored Contributor

Re: different types of ps

Hi Shiv,

As already mentionned (not in front of anything except my pc at home now so cant check...)/usr/ucb/ps is what I remembered seeing on SOLARIS when SUn passed from SunOS (BSD) to SOLARIS (UVr4), at the time I was surprised to find there a command all sun admins say never existed other than on HP: vipw!
So its almost just a question of flavor...
but there are some differences in its behaviour when you look at the output:
/usr/ucb/ps ax is very close (sunos - linux) is quite similar to ps -ef (hp)
but:
/usr/ucb/ps auxw gives you the top cpu,mem and the applications running has no simple HP /usr/bin/ps equivalent...
but you could try to write a script to give you something alike using UNIX95= ps -e -o pcpu -o pid....

(I let you work it out...)
All the best
Victor
Hunki
Super Advisor

Re: different types of ps

Hi Shiv,

Nice question, for me the gretest difference is that /usr/ucb/ps -auwwx can give you long strings of output which cannot be viewed by the normal /usr/bin/ps.

eg. recently I had to look for java processes running on the system , while /usr/bin/ps gave me the same output , /usr/ucb/ps gave me the whole processes along with its many options and I cud easily find out which process was running what.

The /usr/ucb/ps takes more time also to get the output because its more exaustive.

hunki
Hunki
Super Advisor

Re: different types of ps

Assign points please . This will be my first :)
Shivkumar
Super Advisor

Re: different types of ps

i have already assigned you point :-))

thanks,
shiv
Steven E. Protter
Exalted Contributor

Re: different types of ps

Shalom Shiv,

Also note that /usr/bin/ps

Is the one on the HP-UX standard path and most likely any code you see in the forums referring to ps is going to assume that is to be used.

I don't need any points for this Shiv, just wanted to clarify.

Since the Coffee is kicking in, I'd advise Hunki to improve his point assignment ratio to 100% prior to pointing out issues with others point assignment.

Congrats to Hunki on his first bunny. Hopefully many more to follow.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com