– ps is an extensively used command in Linux environment to track/get the processes for any kind of troubleshooting.
– It is very versatile command to get the many stats for processes from the OS.
1. To see the zombie process
|
2. Listing zombie processes
|
3. To find/list the running processes
|
4. Find processes for a particular user # ps -u apache |
5. To see every process running as root (real & effective ID) in user format:
|
6. To find/list the processes which has tatad.pl in its command execution?
|
7. List the processes based on PIDs
|
8. pgrep, pkill – look up or signal processes based on name and other attributes # pkill 1234 OR # pkill httpd |
9. Sorting the ps output
|
10. To print a process tree: # ps axjf |
11. Print only the process IDs of syslogd:
|
12. Print only the name of PID 42:
|
13. List the Process based on the UID and Commands
|
14. List the processes based on PIDs or PPIDs
|
15. List Processes in a Hierarchy
|
16. List elapsed wall time for processes
|
17. To list the process hierarchy # ps -ejH |
18. List all threads for a particular process
|
19. To display a tree of processes.
|
20. To list elapsed wall time for processes
|
|
22. To get the process start time
|
23. Display full information about each of the processes currently running.
|
24. To get info about threads: # ps axms |
25. To get security info: # ps -eM |
26. To see every process with a user-defined format: # ps -eopid,tt,user,fname,tmout,f,wchan |
27. List all threads for a particular process
|