Linux process management notes

  
        Linux Process Management

View Process

ps aux View all processes in the system a-all

ps -le

pid(process number) cpu( Cpu occupied) mem (memory occupied) VSZ (virtual memory occupied) RSS (real memory occupied) TTY (login terminal number) (? kernel boot) stat (process state) TIME (CPU time) process name

pstree display process tree

top

Refresh every 3 seconds to determine an important indicator of health, you can enter the command [option] -d specify the number of seconds to specify the top every second Update once. The default is 3 seconds -n times -b uses batch mode output -n specifies the number of times the command is executed [command in interactive mode]? Or h: help showing interactive mode P sort by cpu usage M sort by memory usage N sort by Pid q exit top

first few rows first row server runtime user load averrage (average load, Close to 1 load is large) The second column tasks (number of processes) The number of running processes The process of sleeping is stopping the process zombie process The third column CPU (the percentage of cpu occupied by user mode) sy system mode occupied by the percentage of cpu ni change Percentage of user processes occupied by priority user ip percentage of idle cpu percentage of cpu occupied by hardware terminal request service si percentage of CPU occupied by software interrupt request service virtual time (steal time) fourth column memory buffer (buffer) (Accelerated Write) Cache (Accelerated Read)

top -b -n 1 > /root/top.log Batch writes files to a file.

Kill process: kill -l View available process number kill -l 2235 Restart process kill -9 2236 Force kill process killall [option][signal] Process number pkill -9 -t pts/1 Follow Terminal culling user 1) SIGHUB

nice nice -n -5 service httpd start renice -10 process number

Work management: Work management refers to a single login terminal

Copyright © Windows knowledge All Rights Reserved