LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 06-28-2007, 07:33 AM   #1
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Rep: Reputation: 30
What is difference between /usr/sbin/ps & /usr/ucb/ps command


Hi

Can anybody tell me what is the diff between above ps commands.

1. /usr/sbin/ps
2. /usr/ucb/ps

Thanks
Rajan
 
Old 06-28-2007, 07:42 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
/usr/bin/ps and /usr/ucb/ps are the same in that they are wrappers to call the platform specific ps (see /usr/bin/sparcv9/ps for example). /usr/ucb/ps should be the BSD ps /usr/sbin/ps should be the SVR4 ps. You can probably check this by examining their properties.
 
Old 06-28-2007, 07:43 AM   #3
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Quoted from http://svn.joyent.com/public/acceler...to-solaris.txt
Quote:
2) Solaris's "ps" is different, but the BSD ps (which is the same for some Linux, others are
Solaris-ish) is in /usr/ucb/ps. The command that is equivalent to /usr/usb/ps -axu is "ps -aef".
 
Old 06-28-2007, 12:20 PM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,502

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Yes, ucb in /usr/ucb stands for "University of California, Berkeley", which shows the BSD roots of these commands.
 
Old 07-01-2007, 05:06 PM   #5
wrokon
LQ Newbie
 
Registered: Jul 2007
Location: RTP, NC
Distribution: Ubuntu, Centos, Puppy
Posts: 5

Rep: Reputation: 0
Not really "platform specific"

Quote:
Originally Posted by Simon Bridge
/usr/bin/ps and /usr/ucb/ps are the same in that they are wrappers to call the platform specific ps (see /usr/bin/sparcv9/ps for example). /usr/ucb/ps should be the BSD ps /usr/sbin/ps should be the SVR4 ps. You can probably check this by examining their properties.

You can invoke either one on UlrtraSPARC platforms (at least for the Solaris 8 and 9 that I have used them on). It is dependent on the path setting for your login session (if not including full path for "ls" command) - the default Solaris path uses /usr/bin, and omits /usr/ucb since that is a holdover from the "deprecated" SunOS 4 and earlier based on BSD unix prior to Sun's changeover to a unix based on AT&T's SvR4, which they then "marketed" as Solaris 2 (think they retro-named SunOS 4.x "Solaris 1" ;-). Since that name change, which went on up to 2.6, they dropped the "major" number, and designated only by the 'minor' number: 7, 8, 9, 10 - annoying to see Solaris "2.7", "2.9" by those oblivious to that change in nomenclature ;-).

More importantly, /usr/ucb/ps with "e" (and some other options, "xe"), can reveal all environment variables' settings for a process, and is supposed to be "turned off" by recent Solaris patches for 8 and 9 (10 is "unaffected") per this alert: http://sunsolve.sun.com/search/docum...=1-26-102215-1) as a security measure. Some env variable settings might include passwords, database connect strings, etc depending on approach used for that Id and the process it may be running.

HTH,
wrokon
 
Old 07-01-2007, 06:48 PM   #6
wrokon
LQ Newbie
 
Registered: Jul 2007
Location: RTP, NC
Distribution: Ubuntu, Centos, Puppy
Posts: 5

Rep: Reputation: 0
Re: not really "platform specific"

1. SPARC processor-based machines (sun4m) can also run either ps in Solaris 9 (I believe) on down depending on path, not just the UltraSPARC (sun4u). It does seem that Solaris 10 is only for sun4u (and something newer?). (I need to upgrade my old Sparc LX from Sol 7 before my Sol 9 CD's go bad to have it to play with, although NetBSD should run faster in 196MB - maybe a dual boot ... ;-}

2. The options for the unpatched /usr/ucb/ps that are too "revealing" are -axe (I repeated the "e", and omitted the "a").

wrokon
 
Old 07-05-2007, 12:53 PM   #7
none.entered
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Rep: Reputation: 0
if you have ever wondered which executable is being run by a process (after looking at 'ps' o/p), '/usr/ucb/ps auxwww' comes to your aid. it shows you the exact command that invoked all the processes you see via 'ps'.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/ucb/ps auxww (not showing all) linuxtesting2 Solaris / OpenSolaris 4 03-20-2007 05:01 PM
making files available in /usr/local/bin and /usr/sbin reakinator Linux - Newbie 1 10-14-2006 05:09 PM
Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/local/lib/libaprutil-0.so. bijuhpd Linux - Newbie 1 10-30-2005 05:07 PM
Difference between /usr/ and /usr/local/ ? MDesigner Linux - Newbie 7 07-04-2004 09:37 AM
/usr/sbin and /sbin world read/executable... why? lazlow69 Slackware 3 04-29-2004 05:06 PM


All times are GMT -5. The time now is 01:26 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration