1844275 Members
2761 Online
110230 Solutions
New Discussion

ps ax

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

ps ax

following is from man page:
a select all processes on a terminal, includ­ing those of other users

x select processes without controlling ttys

can anybody explain to me what these two mean, i don't understand what man page says.

thanks,

on redhat, but should be same on hpux.
none
7 REPLIES 7
Umapathy S
Honored Contributor
Solution

Re: ps ax

Hanry,

-a Select all processes except process group leaders and processes not associated with a terminal.


This option selects those processes who are not process group leaders and having a controlling terminal. The suitable example is a daemon. Since daemon needs to run the background and should not be affected by any signals generated for the shells/terminals. Say, if you start a daemon from a termainal and quit that terminal, the daemon continues to run. They are indicated by the ? mark in 6th column.

-x represents the extended format of the ps command where you can see the full command line. Before that we used to get only 255 chars max.

In RH Linux, -a selects all except session leaders and -x selects all except controlling ttys which is when combined equivalent to -a of hpux.

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Hanry Zhou
Super Advisor

Re: ps ax

I still don't get it 100%, although may be 50%, can anybody explore it a little bit more?
none
Pete Randall
Outstanding Contributor

Re: ps ax

Hanry,

I think Umapathy did about as good a job of explaining as you're going to get when you post a Linux question on an HP-UX forum. You might want to try the Linux forum and see what they can contribute.


Pete

Pete
Hanry Zhou
Super Advisor

Re: ps ax

I'm pretty clear on HPUX with regards how ps ax works which will list all daemons, not terminal related processes,

but I'm not so clean on Linux. if I type:
ps ax | grep rpc
rpc.stad will be listed, which is not expected, since it is a daemon, and not a particular tty assoicated.

Also, I checked manpage, and there is no "x" option on HPUX.
none
Victor BERRIDGE
Honored Contributor

Re: ps ax

Well,
Imho ps -ax under linux doesnt give the same as on HPUX, its what I used to type on my slackware some time ago or on SUNOS4.XX, its closest output HPUX point of view would be:
ps -ef...


All the best

Victor
Pete Randall
Outstanding Contributor

Re: ps ax

Hanry,

You must have an older system. My man page for ps says:

" -x Shows the command line in extended format."


Pete

Pete
Bruno Ganino
Honored Contributor

Re: ps ax

Hanry, i think that Victor has write well.
The command ps -ef is right.
In my old system (if remember good) i have used ps -edalf.
Bruno
Torino (Turin) +2H