LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   CPU load -> process control? (https://www.linuxquestions.org/questions/debian-26/cpu-load-process-control-248783/)

bobbens 10-29-2004 11:31 AM

CPU load -> process control?
 
Im sorta wondering about controling processes. After having my CPU running for a while and running a few programs, gkrellm tells me my processor is on a 99% load, when it should be at 10% tops. I want to know if there is a way to tell which process is abusing my poor CPU, so i can localize the problem and get my CPU power back. I can tell my computers lagging when it shouldn't.

Specs that might be of interest:

amd xp 2600+ running at 2ghz (barely an OC i know :P )
512 mb ram
500 mb swap
7200 rpm 120 gb hdd

i have started to notice this problem more or less after running aMule, though it might not be related...

McCloud 10-29-2004 11:37 AM

Open a console and execute the command 'top'.

Good luck.

bobbens 10-29-2004 12:12 PM

sweet thanks, but do you know a way to force close processes?

McCloud 10-29-2004 01:38 PM

In the first column of the 'top' screen you see a PID number (process id). You can kill a process by using the command "kill -9 [processid]. So if your proces has ID number 1012: "kill -9 1012".

Another nice command is 'ps' which lists the processes running on your system. I normally use the command "ps -Af" (which lists all the processes running on your system).

McCloud 10-29-2004 01:43 PM

I forgot to tell you that if the proces is a daemon, you can stop it with the command "/etc/init.d/[daemon-name] stop". Actually this way you can start/stop/restart daemons.

I sometimes have problems with the FAM daemon (it eats 99% of my cpu), so I restart it with "/etc/init.d/fam restart".


All times are GMT -5. The time now is 09:51 AM.