Basic question
Hi
I am new to Unix and Linux. I just have a very basic question: When I run 'PS' command, I only got two lines like below: ===================== PID TT S TIME COMMAND 1327 pts/0 S 0:00 -csh ===================== But if I run 'PS -a' command, I got more lines like below: ============================= PID TT S TIME COMMAND 327 console S 0:00 /usr/lib/saf/ttymon -g -h -p milford3 console login: - 1327 pts/0 S 0:00 -csh 1347 pts/0 O 0:00 ps -a ============================= My question is "Isn't 'PS' command mean the current running process?" If so, how come when given argument, it will show more current running process? Thanks a lot! |
Re: Basic question
Quote:
When you specify the 'a' command line option you are showing processes started by users/accounts other than just your account. add u to heave it tell you which user started the process, and x to show processes without controlling terminals, togather this is show all processes. To learn a little more about ps try here http://man.he.net/?topic=ps§ion=all |
PS command
So 'PS' and 'PS -ax' all mean the current running process?
|
PS gives a snapshot of the running processes, by adding the switches you refine the actions of the command. In the case of -a you select all with a TTY except session leaders. I think this means that you show the processes that are talking to your screen(?)
If you try ps -A you will get a list of all the processes, remember that Linux and UNIX are case sensitive. This is in Red Hat, I guess the rest of the distros are much the same? |
Thank you for your reply.
What does this mean? -a List information about all processes most fre- quently requested: all those except process group leaders and processes not associated with a termi- nal. "most frequently requested"? |
most frequently requested
I guess that that means as it says. Your screen will refresh very quickly and that will be a process.
Like you I am a real new comer to Linux so I am trying to and learn at the same time...... |
ps is a distro/Unix ver dependent cmd. for instance, on my RH9 system we get (from the man page):
Code:
Code:
COMMAND-LINE OPTIONS |
I think doing
#man as and #info as * where # is your console prompt should give you indepth information on what this command does and all the options you could use with it, in fact you can do #man [command] for any linux command. Cheers |
PS -au showed me as root
How come when I typed 'PS -au' it showed me as root? I didn't log in as root.
root 15234 0.2 0.5 1448 1176 pts/1 O 09:27:24 0:00 ps -ua |
Continues Question
What does this mean?
"... x to show processes without controlling terminals..." What are controlling terminals? |
All times are GMT -5. The time now is 06:49 AM. |