Use the top command to view the background processes in real time, and you will see the following information
Official explanation:
us: user cpu time (or) % CPU time spent in user space
sy: system cpu time (or) % CPU time spent in kernel space
ni: user nice cpu time (or) % CPU time spent on low priority processes
id: idle cpu time (or) % CPU time spent idle
wa: io wait cpu time (or) % CPU time spent in wait (on disk)
hi: hardware irq (or) % CPU time spent servicing/handling hardware interrupts
si: software irq (or) % CPU time spent servicing/handling software interrupts
st: steal time - - % CPU time in involuntary wait by virtual cpu while hypervisor is servicing another processor (or) % CPU time stolen from a virtual machine
us: user process sy: system process id: how many CPUs are left wa: how many are waiting for CPU, >0 means the system is performing io operations
hi: hardware interrupt si: software interrupt st: percentage of CPU stolen (this is why we install virtual machines)
swap swap partition, start using it, indicating that the memory is not enough
PID: Process ID PR and NI combined to control the priority of the process
VIRT: virtual memory RES: physical memory SHR: shared memory S: process running state
------- Under the top command, press 1 to view how many CPUs there are and the detailed information of the CPUs
Zombie process: The parent process has been closed, and the child process has not been closed. It still exists in memory, but is not working, so it is a zombie process.
Use free for memory viewing
Use ps aux to view all processes
Here is a grep command to filter, you can only see the process you want to see
ps aux | grep 'init' will only see process information containing init
ps aux | grep 'init' | grep -v 'grep' will only see process information that contains init and does not contain grep
kill -9 pid/% job number: force recycling process
kill -9 process name: will recycle all processes with this name
-------pgrep command, you can quickly view the process pid
pstree is used to view the process tree