21 essential Linux test commonly used commands, every day a knock, knock three times each, monthly cycle, all can remember! !
https://www.cnblogs.com/poloyy/category/1672457.html
View all processes
PS -A
View java process
ps -ef | grep java
Show all process information, along with the command line
ps -ef
ps combined with grep common usage, finding specific process
ps -ef | grep java
ps -ef returns a list of the meaning of each field
- UID: indicates that the user ID
- PID: that the process ID
- PPID: represents the parent process ID
- C: represents the CPU usage
- STIME: process start-up time
- TTY: terminal's location Login
- TIME: represents a process performed until the present total CPU usage time
- CMD: represents the command to start the process of
Show all processes more detailed information, including process consumes CPU, memory
ps aux
According to CPU, memory, using a descending sort
ps aux --sort - pcpu
ps -aux --sort -pmem
ps -aux returns a list of the meaning of each field
- USER: user indicates which started this process
- PID: Process ID
- % CPU: the process of CPU occupancy rate
- % MEM: Process physical memory usage
- VSZ: amount of virtual memory (Kbytes) occupied by the process
- RSS: The current process actually how much memory
- TTY: terminal to which the above process is in operation, if nothing to do with the terminal, display, in addition, tty1-tty6 is a sign above the machine's program, if it is pts / 0, and so on, then expressed as a network connection? into the program host.
- STAT: The current state of the program, the main state has
- R: run; the program currently in operation or operations may be
- D: uninterruptible: usually IO process
- S: Interrupt; the program which is currently being sleep (can be said idle state), but can be woken up some signal (signal).
- T: Stop: This program is currently being detected or stopped
- Z: Zombie: The program should have been terminated, but his father was not normal procedure to terminate him, resulting in the state of zombie (zombie) program
- START: The start time point process
- TIME: the process from start to now, the actual occupation of the total CPU time
- COMMAND: command to start the process