PS Command Introduction
Used to report the process status of the current system. You can break and delete unnecessary programs with the KILL command at any time.
The PS command is the most basic and powerful process view command that can be used to determine which processes are running and running, whether the process is complete, if the process is dead, which processes are consuming too many resources, and so on.
ps Command parameter Description
-e View all processes, equivalent to-a
-O Custom output format
-F All listed, listing more detailed information for each process
-T Display thread
-L Display Thread
Ps-ef | grep tomcat-web "View process number"
Ps–o nlwp 27989 "View threads in a process nlwp meaning is number of light-weight process"
Ps-elf "Lists all threads and threads that belong to the process, including all the details"
Ps-elf|grep 722 grep-v "grep" "Use the process number to view the thread under the process, grep's output will have grep itself this process, with Grep-v" grep "can take this line to kill"
Ps-elo Pid,stat,spid | grep 26145 | grep running | Wc-l "Ps-el can find all threads, -0 pid,stat,spid, custom output format, according to process number, status, thread number output, two grep commands to filter process number and thread state respectively, WC statistic number"
"Linux command" PS command