Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to view the process under Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to view the progress under the Linux", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to view the progress under the Linux" this article.

Method 1:

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 figure above explain:

USER: the name of the user account that started the process PID: the ID number of the process, which is the only% CPU:CPU percentage in the current system% MEM:% memory footprint

VSZ: size of virtual memory (swap space) RSS: size of resident memory (physical memory)

TTY: on which terminal the process runs. "?" Table unknown or does not require terminal STAT: shows the current state of the process, such as S (hibernating), R (running), Z (dead),

START: the time when the process was started TIME: the process took up CPU time COMMAND: the name of the command that started the process

Summary: ps aux displays process information in the form of a simple list.

Method 2: ps-elf

-e: displays all process information in the system.

-l: displays process information in long format.

-f: displays process information in full (full) format.

The above field explains that PPID is the PID of the parent process, mostly just like the first one.

Method 3: top

Display the ranking of processes with a full-screen interactive interface, and timely track the occupation of system resources, including CPU, memory and so on. By default, it is refreshed every three seconds, which is basically similar to the task manager in the Windows system.

Img

The above figure explains: Tasks (system tasks) information: total, total number of processes; running, number of running processes; sleeping, number of dormant processes; stopped, number of aborted processes; zombie, number of dead and unresponsive processes.

CPU information: us, user occupancy; sy, kernel occupancy; ni, priority scheduling occupancy; id, idle CPU;wa,I/O waiting occupancy; hi, hardware interrupt occupancy; si, software interrupt occupancy; st, virtualization occupancy. To know the percentage of CPU that is free, mainly look at the% id section.

Mem (memory) information: total, total memory space; used, used memory; free, free memory; buffers, cache area.

Swap (swap space) information: total, total swap space; used, used swap space; free, free swap space; cached, cache space.

Method 4: pstree-aup

You can query a specific process with | grep. For example, pstree-aup | grep php

Img

The derivative relationship between processes is shown in the way of tree diagram, and the display effect is more intuitive. -a: displays the complete instruction for each program, including the path, parameter, or resident service tag;-c: does not use reduced notation;-G: uses the column drawing characters of the VT100 terminal;-h: when listing the tree diagram, specifically indicates the currently executed program;-H: the effect of this parameter is similar to that of the specified "- h" parameter, but specifically indicates the specified program. -l: display the tree view in long column format;-n: sort by program identification code. The default is to sort by program name;-p: display program identification code;-u: display user name

The above is all the contents of the article "how to View the Progress under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report