Linux commands: Difference between revisions

Jump to navigation Jump to search
334 bytes added ,  3 June 2016
Line 198: Line 198:
=== Show the process list & kill the process ===
=== Show the process list & kill the process ===
Show the process list & kill the high-resource-consumption process<ref>[http://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html How do I Find Out Linux CPU Utilization? - nixCraft]</ref><ref>[http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/ Show All Running Processes in Linux]</ref>
Show the process list & kill the high-resource-consumption process<ref>[http://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html How do I Find Out Linux CPU Utilization? - nixCraft]</ref><ref>[http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/ Show All Running Processes in Linux]</ref>
# {{kbd | key=top }} "display Linux tasks" for {{Linux}} or {{kbd | key=<nowiki>top -a</nowiki> }} "Sort by memory usage" for {{Linux}}
# display the process list
#* {{kbd | key=top }} "display Linux tasks" for {{Linux}} or  
#* {{kbd | key=<nowiki>top -a</nowiki>}} or {{kbd | key=<nowiki>ps aux --sort -rss | more</nowiki>}} "Sort by memory usage" for {{Linux}}
# keyin {{kbd | key=q}} to leave the process list
# keyin {{kbd | key=q}} to leave the process list
# find which process to be killed. Keyin: {{kbd | key=kill -101 PID}} to kill the process with PID number: 101<ref>[http://www.cyberciti.biz/faq/kill-process-in-linux-or-terminate-a-process-in-unix-or-linux-systems/ Kill Process in Linux or Terminate a Process in UNIX / Linux Systems]</ref>
# find which process to be killed. And then keyin:  
#* {{kbd | key=kill -101 PID}} to kill the process with PID number: 101<ref>[http://www.cyberciti.biz/faq/kill-process-in-linux-or-terminate-a-process-in-unix-or-linux-systems/ Kill Process in Linux or Terminate a Process in UNIX / Linux Systems]</ref>
#* {{kbd | key=kill -9 101}} force to kill the process with PID number: 101<ref>[http://linux.vbird.org/linux_basic/0440processcontrol.php#killjobs 鳥哥的 Linux 私房菜 -- 第十六章、程序管理與 SELinux 初探]</ref>


=== Search matched text of command output ===
=== Search matched text of command output ===

Navigation menu