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 use the ps command in Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to use the ps command in Linux. It is very detailed and has a certain reference value. Friends who are interested must finish it!

(cpu) usage, observe the process information:

Ps auxw | sort-K3-rn | head-20

There are five states of a process on linux:

Run (running or waiting in the run queue)

Interrupt (while dormant, blocked, waiting for the formation of a condition or receiving a signal)

Uninterruptible (unawakened and unrunnable upon receipt of the signal, the process must wait until an interruption occurs)

Deadlock (the process is terminated, but the process descriptor exists until the parent process calls the wait4 () system call to release)

Stop (the process stops running after receiving SIGSTOP, SIGSTP, SIGTIN, SIGTOU signals)

The ps tool identifies five status codes of the process:

D non-interruptible uninterruptible sleep (usually IO)

R runs runnable (on run queue)

S interrupt sleeping

T stop traced or stopped

Z zombie a defunct ("zombie") process

Name: ps

Permissions: all users

Usage: ps [options] [--help]

Description: displays the dynamics of instantaneous travel (process)

Parameters:

There are so many parameters in ps. Only a few commonly used parameters are listed here and their meanings are briefly introduced.

-A list all itineraries

-w display widening can display more information

-au displays more detailed information

-aux displays all itineraries that include other users

Au (x) output format:

USER PID CPU MEM VSZ RSS TTY STAT START TIME COMMAND

USER: process owner

PID: pid

% CPU: occupied CPU utilization

% MEM: memory usage occupied

VSZ: size of virtual memory occupied

RSS: the amount of memory occupied

TTY: secondary device number of the terminal (minor device number of tty)

STAT: the status of the trip:

D: uninterruptible stillness

R: in progress

S: static state

T: suspend execution

Z: does not exist but cannot be eliminated for the time being

W: there are not enough memory pages to allocate

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

Database

Wechat

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

12
Report