In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
In order to monitor and control the process, we must first understand the current process, that is, we need to look at the current process, and the ps command is the most basic and powerful process view command. Use this command to determine which processes are running and running status, whether the process ends, whether the process has zombies, which processes take up too many resources, and so on. In short, most of the information can be obtained by executing the command.
The ps command is most commonly used to monitor the work of background processes, because background processes do not communicate with standard input / output devices such as on-screen keyboards, so if you need to detect the situation, you can use the ps command.
1) ps a displays all programs under the current terminal, including those of other users.
2) ps-A shows all programs.
3) when ps c lists programs, it displays the real instruction name of each program, without the path, parameter, or resident service tag.
4) ps-e this parameter has the same effect as specifying the "A" parameter.
5) when ps e lists programs, it displays the environment variables used by each program.
6) ps f displays the tree structure with ASCII characters to express the relationship between programs.
7) ps-H shows a tree structure, indicating the relationship between programs.
8) ps-N displays all programs except those under the ps instruction terminal.
9) ps s displays the status of the program in the format of program signals.
10) when ps S lists the program, it includes the interrupted subroutine data.
11) ps-t specifies the terminal number and lists the status of the programs that belong to the terminal.
12) ps u displays the program status in a user-oriented format.
13) ps x displays all programs, not distinguished by terminals.
The most common method is ps-aux, and then use a pipe symbol to direct to grep to find a specific process, and then operate on a specific process.
There are five states of a process on linux:
1. Run (running or waiting in the run queue)
two。 Interrupt (while dormant, blocked, waiting for the formation of a condition or receiving a signal)
3. Uninterruptible (unawakened and unrunnable upon receipt of the signal, the process must wait until an interruption occurs)
4. Deadlock (the process is terminated, but the process descriptor exists until the parent process calls the wait4 () system call to release)
5. 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
Note: other states include W (no resident pages)
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.