Linux Basics-Process Management related commands (1)

Source: Internet
Author: User

This paper mainly introduces the related commands of process management in Linux, and the main commands involved are pstree,ps.


(1) Pstree

① function: Used to view the process tree

② use case:


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/38/1A/wKiom1Oyx2LwwHgbAAITAzecMv4130.jpg "title=" Pstree.png "alt=" Wkiom1oyx2lwwhgbaaitazecmv4130.jpg "/>


(2) PS

① function: command to display the status of the system's current process

② use case:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/38/1A/wKiom1OyyEfhyoU-AABY7DIFrrA290.jpg "title=" ps.png "alt=" Wkiom1oyyefhyou-aaby7difrra290.jpg "/>

③ Related uses:

    1. PS A: Show all processes associated with the terminal

      650) this.width= 650; "Src=" http://s3.51cto.com/wyfs02/M00/38/1A/wKiom1OyyN_C8RrcAAEHfINn54c025.jpg "title=" PS a.png "alt=" Wkiom1oyyn_c8rrcaaehfinn54c025.jpg "/>

    2. PS x: Show all terminal-independent processes

      650) this.width=650;" Src= " Http://s3.51cto.com/wyfs02/M01/38/1A/wKiom1OyyTrTrkEAAAKzCFyBkpI074.jpg "title=" PS x.png "alt=" Wkiom1oyytrtrkeaaakzcfybkpi074.jpg "/>

       


      Related comments:

        Stat code meaning:

         s: interruptible sleep State

         D: Non-interruptible sleep state

         r: Run or run

         t: Stop

         z: Zombie

         s:session leader

         L: Multithreaded process

         +: Foreground process

         N: Low priority process

        &NBSP;<: high-priority process

      Time: Run time

      Command: Which command initiated the process With [] indicates kernel process

    3. PS u: User-centric display of process-related information

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/38/1A/wKiom1OyysrBZXdpAAIZdXoZOAA881.jpg "title=" PS U.png "alt=" Wkiom1oyysrbzxdpaaizdxozoaa881.jpg "/>


Related notes:

%cpu:cputime/realtime

%mem:memory/realmemory

Vsz:virtual Memory size (linear address space size)

RSS: Non-exchangeable physical memory space, resident memory set


4. Related options:

-e: Show All Processes

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/38/1A/wKiom1OyzEfwTWL6AADq8ix5K2U432.jpg "title=" PS- E.png "alt=" Wkiom1oyzefwtwl6aadq8ix5k2u432.jpg "/>

-F: Full format list

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/38/1A/wKioL1OyzGXiF7AZAACExi34lD0921.jpg "title=" PS- F.png "alt=" Wkiol1oyzgxif7azaacexi34ld0921.jpg "/>

-EF:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/38/1B/wKiom1OyzOWwgZmfAAG5NuxFtGE262.jpg "title=" PS- Ef.png "alt=" Wkiom1oyzowwgzmfaag5nuxftge262.jpg "/>

-F: Show additional information

-H: Show process hierarchy relationship

-EFH:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/38/1B/wKiom1OyzUHzYHYXAAId9jJwsWk575.jpg "title=" PS- Efh.png "alt=" Wkiom1oyzuhzyhyxaaid9jjwswk575.jpg "/>

-O: Custom display format, for example: Ps-o Pid,command

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/38/1A/wKioL1OyzezCGCs1AABMCttzFj0193.jpg "title=" PS- O.png "alt=" Wkiol1oyzezcgcs1aabmcttzfj0193.jpg "/>



This article is from the "xlows" blog, make sure to keep this source http://xlows.blog.51cto.com/5380484/1433306

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.