LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2009, 03:17 AM   #1
jtbinuya
LQ Newbie
 
Registered: Aug 2007
Posts: 11

Rep: Reputation: 0
Help to kill process that is eating too much CPU.


Good day,

I have a webserver which is currently experiencing high cpu usage.

16:15:04 up 130 days, 22:39, 8 users, load average: 5.65, 5.47, 5.50
492 processes: 484 sleeping, 7 running, 1 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 85.0% 0.0% 2.1% 0.0% 12.6% 0.0% 0.0%
cpu00 84.4% 0.0% 2.3% 0.1% 13.0% 0.0% 0.0%
cpu01 57.9% 0.0% 4.1% 0.0% 37.7% 0.0% 0.1%
cpu02 98.2% 0.0% 1.7% 0.0% 0.0% 0.0% 0.0%
cpu03 99.8% 0.0% 0.1% 0.0% 0.0% 0.0% 0.0%
Mem: 8200508k av, 7756504k used, 444004k free, 0k shrd, 174840k buff
5234572k actv, 1549892k in_d, 180244k in_c
Swap: 16386292k av, 28388k used, 16357904k free 3042660k cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
26643 appcsp 25 0 981M 981M 25204 R 16.7 12.2 83:26 2 java
27388 appcsp 25 0 981M 981M 25204 R 16.4 12.2 97:26 2 java
27661 appcsp 25 0 981M 981M 25204 R 16.4 12.2 73:14 2 java
27220 appcsp 25 0 981M 981M 25204 R 16.1 12.2 92:39 0 java
4487 appcsp 25 0 981M 981M 25204 R 12.4 12.2 94:48 3 java
=============

but when I try to grep the pid of the top processes above I get nothing. How can I kill the top processes. Is there any way to kill this.

[appcsp@pldtwebcache2 appcsp]$ ps -ef|grep 26643
appcsp 32178 30225 0 16:16 pts/7 00:00:00 grep 26643
[appcsp@pldtwebcache2 appcsp]$


Thanks
 
Old 01-15-2009, 03:31 AM   #2
jtbinuya
LQ Newbie
 
Registered: Aug 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Here's my update on the situation. I tried to kill one of the processes that was eating too much cpu and like magic the rest of the processes that were also utilizing high cpu load just disappeared. My utilization is now back to normal.

16:30:51 up 130 days, 22:55, 8 users, load average: 0.28, 2.06, 3.95
470 processes: 468 sleeping, 1 running, 1 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 3.6% 0.0% 0.8% 0.0% 0.1% 0.5% 94.7%
cpu00 2.1% 0.0% 0.5% 0.0% 0.3% 0.0% 96.8%
cpu01 8.5% 0.0% 0.1% 0.0% 0.1% 0.0% 91.0%
cpu02 2.5% 0.0% 1.1% 0.0% 0.1% 0.9% 95.0%
cpu03 1.1% 0.0% 1.3% 0.0% 0.0% 1.3% 96.0%
Mem: 8200508k av, 7119812k used, 1080696k free, 0k shrd, 174996k buff
4593056k actv, 1558792k in_d, 180756k in_c
Swap: 16386292k av, 28388k used, 16357904k free 3054860k cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
22024 appcsp 17 0 899M 899M 25192 S 1.9 11.2 0:09 1 java
26166 appcsp 15 0 113M 113M 4260 S 0.2 1.4 9:02 3 webcached
26641 appcsp 16 0 899M 899M 25192 S 0.2 11.2 0:51 1 java
28977 appcsp 15 0 1744 1744 896 S 0.2 0.0 0:23 3 top
29244 root 15 0 1744 1744 900 R 0.2 0.0 0:22 3 top
26139 appcsp 15 0 113M 113M 4260 S 0.1 1.4 9:44 2 webcached
1 root 15 0 500 464 440 S 0.0 0.0 7:16 0 init


Still no answer on why I couldn't grep the process id.

Thanks
 
Old 01-15-2009, 03:33 AM   #3
chakka.lokesh
Member
 
Registered: Mar 2008
Distribution: Ubuntu
Posts: 240

Rep: Reputation: 32
try using ""ps aux"
 
Old 01-15-2009, 03:37 AM   #4
jtbinuya
LQ Newbie
 
Registered: Aug 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Talking

Quote:
Originally Posted by chakka.lokesh View Post
try using ""ps aux"
Thanks I'll try this when the situation pops-up again.
 
Old 01-15-2009, 03:37 AM   #5
arckane
Member
 
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 307

Rep: Reputation: 38
I would have said "ps -ef"
 
Old 01-15-2009, 03:55 AM   #6
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Rep: Reputation: 51
Me: ps -auxf
 
Old 01-15-2009, 04:22 AM   #7
jtbinuya
LQ Newbie
 
Registered: Aug 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks all for the suggestions. I'll try this when I get the chance and post the output.
 
Old 01-16-2009, 02:59 AM   #8
vasmakk
Member
 
Registered: Jan 2009
Distribution: Debian Lenny, Ubuntu 9.04
Posts: 87

Rep: Reputation: 16
Quote:
Originally Posted by jtbinuya View Post
Thanks all for the suggestions. I'll try this when I get the chance and post the output.
... after you list all processes with ps command (see previous posts)
you can kill the process you want with
kill <processID>
e.g kill 956 kills the process with ID number: 956

Vas
 
  


Reply

Tags
cpu, high, usage


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kacpid eating cpu 99% cpu time! tjclancy Linux - Software 13 09-19-2011 04:08 PM
Boot with 'acpi=no'-Ubuntu shows one core,normal boot-kacpid process is eating 70%CPU WebEyeX Ubuntu 5 05-18-2008 07:48 AM
XFS is eating my CPU xKintaro Debian 0 09-27-2005 10:01 AM
ksoftirqd eating >60% of my CPU subaruwrx Fedora 0 09-22-2004 02:10 AM
Need help with logrotate process eating 99.9% CPU glock19 Linux - General 5 12-30-2002 09:02 PM


All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration