Linux Command explanation ps

Source: Internet
Author: User

Zookeeper

Function

Displays process information.

Format

Ps [options]

Main Parameters

Basic Process Selection Control

-A,-e

All processes

-N, -- deselect

Select all processes except for meeting specific conditions

-D

All except the first PROCESS OF THE SESSION

T

All processes of the Terminal

R

Only running processes are displayed.

List Selection Control

-C

Select by command name

-G

By realgroup ID

-U

Based on the user ID or user name

-P, -- pid

List by process ID

-- Ppid

Select a process based on the parent process id list

-S, -- sid

Select Based on the session id list

Output Format

-F

Complete

-- Format,-o

Custom format

-J

Job format

-M

Add a column about security data

-H

Display process levels

-- Headers

Repeat the title line

-- No-headers

Do not show title line

Thread display

-L

Display threads in the LWP and NLWP Columns

-M

Display thread after Process

Others

-V, -- version

Show version information

-- Info

Display debugging information

-- Help

Show Help Information

Example

Display All process information in standard format

Ps-ef

Output process tree

Ps-eH

Obtain thread Information

Ps-eLf

Ps-emf

Obtain security information

Ps-eM

Display All processes running as root or admin

Ps-Uroot, admin-f

Display All processes in custom format

Ps-eopid, tt, user, fname

Display only the process ID of a command

Ps-Ccommandname-o pid =

Output process name with PID 42

Ps-p 42-o comm =

Output all process information with PPID 42

Ps -- ppid42-f

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.