"Linux command" PS command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.