Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to view the process in linux

Shulou Source: shulou.com Published: 2022-06-02 00:23:33 10月27日 Update

This article is to share with you about how to view processes in linux. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Linux view the process of the method: 1, use the "ps aux" command to view, can display the process information in the form of a simple list; 2, use the "ps-elf" command to view; 3, use the "top" command to view; 4, use the "pstree-aup" command to view.

The method of viewing the process in linux

A process is program code that runs in CPU and memory, and each process can create one or more processes (parent and child processes).

* * how to view the process: * *

The first kind:

Ps aux

The ps command is used to report the process status of the current system. You can interrupt and delete unnecessary programs at any time with kill instructions. Ps command is the most basic but also very powerful process view command, which can be used to determine which processes are running and running status, whether the process ends, whether the process is dead, which processes take up too much resources, and so on. In short, most of the information can be obtained by executing the command.

A: displays all the process information under the current terminal, including the processes of other users.

U: use a user-based format to output process information.

X: displays the progress of the current user under all terminals.

Example:

* * the fields in the above figure are explained: * *

USER: the name of the user account that started the process

PID: the ID number of the process, which is unique on the current system

Percentage occupied by% CPU:CPU

% MEM:% memory footprint

VSZ: the amount of virtual memory (swap space) occupied

RSS: the amount of resident memory (physical memory) occupied

TTY: on which terminal the process runs. "?" The table is unknown or no terminal is required

STAT: shows the current state of the process, such as S (hibernating), R (running), Z (dead),

Tags: Process information memory command program space user system run terminal name format state idle figure above priority parameter method percentage percentage Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Technology macOS Apple Xiaomi