Questions tagged [ps]

For questions pertaining to ps, a command for printing information about running processes. Use this tag for questions about ps itself or questions about issues arising from using the ps command-line utility.

According to the ps(1) man page

ps (short for "process status") displays a selection of the active processes, subject to having appropriate privileges to obtain information about those processes. If you want a repetitive update of the selection and the displayed information, use instead.

Further reading

How can I prevent 'grep' from showing up in ps results?

Why does `htop` show more process than `ps`

What does aux mean in `ps aux`?

External References

ps specification (The Open Group Base Specifications Issue 7, 2018 edition)

ps article in Wikipedia

635 questions
401
votes
18 answers

How can I prevent 'grep' from showing up in ps results?

When I search for some process that doesn't exist, e.g. $ ps aux | grep fnord wayne 15745 0.0 0.0 13580 928 pts/6 S+ 03:58 0:00 grep fnord Obviously I don't care about grep - that makes as much sense as…
Wayne Werner
  • 11,463
  • 8
  • 29
  • 43
258
votes
3 answers

Why does `htop` show more process than `ps`

In ps xf 26395 pts/78 Ss 0:00 \_ bash 27016 pts/78 Sl+ 0:04 | \_ unicorn_rails master -c config/unicorn.rb 27042 pts/78 Sl+ 0:00 | \_ unicorn_rails worker[0] -c config/unicorn.rb …
Cheng
  • 6,531
  • 11
  • 40
  • 42
255
votes
4 answers

What does aux mean in `ps aux`?

ps aux seems to conveniently list all processes and their status and resource usage (Linux/BSD/MacOS), however I cannot comprehend the meaning of parameter aux using man ps. What does aux mean?
Howard
  • 5,149
  • 5
  • 30
  • 34
156
votes
3 answers

How to see process created by specific user in Unix/linux

I want to see list of process created by specific user or group of user in Linux Can I do it using ps command or is there any other command to achieve this?
148
votes
13 answers

Show top five CPU consuming processes with `ps`

How to show top five CPU consuming processes with ps?
PlanasB
  • 1,625
  • 2
  • 11
  • 9
126
votes
7 answers

How to get whole command line from a process?

How can I get the command arguments or the whole command line from a running process using its process name? For example this process: # ps PID USER TIME COMMAND 1452 root 0:00 /sbin/udhcpc -b -T 1 -A 12 -i eth0 -p…
Michael
  • 1,583
  • 3
  • 13
  • 19
103
votes
3 answers

What are "session leaders" in `ps`?

What are session leaders, as in ps -d which selects all processes except session leaders?
its_me
  • 13,709
  • 23
  • 54
  • 52
81
votes
2 answers

What do the brackets around processes mean?

$ ps -Awwo pid,comm,args PID COMMAND COMMAND 1 init /sbin/init 2 kthreadd [kthreadd] 3 ksoftirqd/0 [ksoftirqd/0] 5 kworker/u:0 [kworker/u:0] 6 migration/0 [migration/0] 7 cpuset …
joslinm
  • 931
  • 1
  • 7
  • 7
74
votes
3 answers

'ps' arguments to display PID, PPID, PGID, and SID collectively

I tried ps with different kinds of switches e.g. -A, aux, ef, and so forth but I cannot seem to find the right combination of switches that will tell me the Process ID (PID), Parent Process ID (PPID), Process Group ID (PGID), and the Session ID…
JohnMerlino
  • 5,941
  • 11
  • 34
  • 38
74
votes
3 answers

How does curl protect a password from appearing in ps output?

I noticed some time ago that usernames and passwords given to curl as command line arguments don't appear in ps output (although of course they may appear in your bash history). They likewise don't appear in /proc/PID/cmdline. (The length of the…
Wildcard
  • 35,316
  • 26
  • 130
  • 258
73
votes
5 answers

How can I show a terminal shell's process tree including children?

When a script is launched from command prompt the shell will spawn a subprocess for that script. I want to show that relationship between terminal level process and its children using ps in a tree style output. How can I do this? What I have tried…
the_velour_fog
  • 11,840
  • 16
  • 64
  • 109
67
votes
2 answers

Top and ps not showing the same cpu result

This is linked to this question. When I run top I get the following result: pid 3038 is using 18% cpu, however when running the result is 5.5%. And this number does not appear to be changing with time (i.e. when running the same command a bit…
Theodor
  • 939
  • 1
  • 8
  • 9
66
votes
1 answer

What does this process STAT indicates?

If you check the STAT column in above image you will see Ss S S< SN and R+ What does this indicates ? Process states. If yes,Then what is the significance of 'Ss S< SN and R+'?
Vishwanath Dalvi
  • 4,346
  • 5
  • 20
  • 17
65
votes
6 answers

View full commands in ps output

When running ps with the -f option in PuTTY (to see the command corresponding to each process), lines which are longer than the terminal width are not fully visible (they are not wrapped on multiple lines). How can I force line wrapping so that I…
sdabet
  • 961
  • 2
  • 8
  • 14
61
votes
5 answers

How can I get a full process list in solaris, without truncated lines?

Is there a way to generate a full process listing in solaris, without truncated lines? I've tried the ps command, with the following arguments: -f Generates a full listing. (See below for significance …
gabe.
  • 11,644
  • 11
  • 44
  • 58
1
2 3
42 43