Process-use the ps command to view process information

Source: Internet
Author: User
This option combination will display the process information of each user. using these options without the prefix will enable the command to run in "BSD" mode

Introduction

The ps command has many options. the simplest format is as follows:

[Allyes_op @ allyes ~] $ Ps

PID TTY TIME CMD

1079 pts/2 00:00:00 bash

1114 pts/2 00:00:00 ps

In this example, the two processes correspond to the bash and ps commands respectively.

By default, the output information of ps commands is not many, but the process information related to the current session terminal is output.

Before introducing other options of the ps command, let's take a look at other fields output by the ps command:

TTY: indicates the control terminal of the process.

TIME: indicates the total cpu time consumed by the process.

========================================================== ========================

Ps x

Adding the x option will tell the ps command to display all processes without worrying about which terminal they are controlled.

The output result adds a new column named STAT, which displays the current state of the process.

========================================================== ========================

STAT status

R

Running status. The process is running or is ready to run.

S

Sleep status. The process is not running, but waiting for an event, such as inputting a keyboard or receiving a network packet.

D

Uninterrupted sleep status. Processes are waiting for I/O operations, such as hard drive

T

Paused. The process is instructed to be paused.

Z

Invalid or zombie process.

<

High-priority process. Processes can be assigned more importance and more CPU time.

N

Low-priority process. The time to use the processor can be obtained only after other higher-priority processes use the processor.

========================================================== ========================

Ps aux

Another common option combination is aux.

This option combination will display the process information of each user. using these options without the prefix will enable the command to run in "BSD" mode.

========================================================== ========================

BSD mode field information

USER

User ID

% CPU

CPU usage percentage

% MEM

Memory usage percentage

VSZ

Virtual memory consumption size

RSS

Actual memory size, in kb

START

Process start time. If the value exceeds 24 hours, the date is used for display.

========================================================== ========================

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.