Linux command ps aux | grep xxx Detailed

Source: Internet
Author: User
Tags cpu usage

To monitor and control the process, you must first understand the current process, which is to see the current process, while the PS command (process Status) is the most basic and very powerful process view command. Use this command to determine which processes are running and running, Whether the process is over, if the process has no zombies, which processes are consuming too much resources, and so on. In short, most of the information can be obtained by executing the command. &NBSP;PS provides us with a one-time view of the process, which provides a view that is not dynamic and continuous. If you want to monitor process times, you should use top Tools.   If you use the PS command directly, the status of all processes is displayed, usually in conjunction with the grep command to see the status of a process. grep (Global search Regular expression (RE) and print out of the line, full search of regular expressions and print out rows) is a powerful text search tool that uses regular expressions to search for text. and print out the matching lines.   Use Example: [[[email protected] updatedb]# PS aux|grep./update_stockroot 14232 0.0 0.0 5928 724 pts/1 s+ 18:16 0:00 gr Ep./update_stockroot 25021 0.0 0.0 3056 816? S Apr12 0:03./update_stock ps aux output format: User PID%cpu%MEM VSZ RSS TTY STAT START Time command  Format Description: User: Trip owner Pi D:PID%CPU: CPU usage%mem: Consumed memory usage vsz: Virtual memory size consumed RSS: Memory size used by TTY: the secondary device number of the terminal (minor device numbers of TTY)  stat: the The state of the journey, the Linux process has 5 states: D non-interruptible uninterruptible sleep (usually IO) R run runnable (on Run queue) S interrupt Sleepingt stop traced or Stopp EdZ Zombie a defunct ("zombie") Process note: Other states also include w (no-dwell page), < (high-priority process), N (Low-priority(Memory lock page).  start: Trip start time: Execution time command: executed instruction  1) PS A shows all the programs under the current terminal, including other users ' programs. 2) ps-a Show All Programs. &NBSP;3) PS C, when listing programs, displays the actual instruction name of each program, without including the path, parameter, or the indication of the resident service. &NBSP;4) Ps-e The effect of this parameter is the same as specifying the "A" parameter. &NBSP;5) PS e shows the environment variables used by each program when listing programs. &NBSP;6) PS F Displays the tree structure with ASCII characters, expressing the relationship between the programs. &NBSP;7) ps-h displays a tree structure that represents the inter-program relationship. &NBSP;8) Ps-n shows all the programs except the program under the PS Command Terminal. &NBSP;9) PS s uses program signal format to display program status. &NBSP;10) PS S lists programs, including interrupted sub-program data. &NBSP;11) ps-t Specify the terminal number and list the status of the program belonging to that terminal. &NBSP;12) PS U Displays the status of the program in a user-oriented format. &NBSP;13) PS x shows all programs, not the terminal to distinguish. PS is the process that shows the current state in running, and grep means searching in these, and PS aux is showing all processes and their status. $ ps aux | grep Amoeba Find Amoeba process $ kill-s 9 pid Kill process  

Linux command ps aux | grep xxx detailed

Related Article

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.