PS, Stands for the abbreviation of Process Status, which is mainly used to list detailed system processes. Like ordinary Linux server users, the TOP command lists and views the current server snapshot process parameters. However, if we need to actually detect the status of the server environment and use detailed process commands, we need to use more PS commands.
In this article, Lao Zuo sorted out the PS commands when he saw them. Although most of them were not touched or blurred, they may be touched in the future, so he sorted them out for future reference.
First, no parameters are used
Instead of using any parameters, we can see that there are four groups of data. PID represents the process ID, TTY represents the process location, TIME represents the time used to execute the process, and CMD represents the current command.
Second, display all processes
ps -ax | less
Third, filter by user
The filtering process is based on the actual user occupation.
Fourth, filter according to CPU and memory usage
Fifth, filter according to the process ID
Here, filter by process keyword after - C.
Sixth, filter according to the specified process ID
Seventh, display process in hierarchy
VIII. Display safety information
IX. Display the process in ROOT user format
Tenth, real-time process view
In sorting out the above 10 commonly used PS commands, ordinary users, including myself, are dizzy. It is better to be familiar with them when they need them or when they use them in a specific environment. Let's just record it first, and then look at the detailed application when necessary.