top – Internetblog.org.uk https://www.internetblog.org.uk Web hosting, Domain names, Dedicated servers Fri, 29 Jan 2016 11:05:52 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.5 https://www.internetblog.org.uk/files/2016/01/cropped-favico-32x32.png top – Internetblog.org.uk https://www.internetblog.org.uk 32 32 Managing Linux System Programs and Processes https://www.internetblog.org.uk/post/475/managing-linux-system-programs-and-processes/ Thu, 10 Sep 2009 16:44:15 +0000 http://www.internetblog.org.uk/post/475/managing-linux-system-programs-and-processes/ TOP
Question: Something is hogging the CPU cycles on my Linux dedicated server. It has gotten really slow. How can I monitor running programs and processes?

Answer: Linux has a handy little tool called “top” that, when run, reveals your top running processes. It also gives you information about your memory usage, server load average, logged-in users, swap usage, uptime, and total number of tasks.

Running “top” is simple. Just login to your server via SSH and type “top”. It will tell you the PID of the process, the user running it, the amount of memory it is using, the cpu percentage, memory percentage, time running, and the command’s name.

If you do happen to find a runaway process, press “q” to exit top, and then kill the process by typing “kill xxxx”, replacing the “xxxx” with the process PID number. If you find a process running under a suspicious user, you might have a security breach. For that, top cannot help you, but at least you will be a step closer to solving your problem.

]]>