Linux - Newbie This 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
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
01-15-2009, 03:17 AM
#1
LQ Newbie
Registered: Aug 2007
Posts: 10
Thanked: 0
Help to kill process that is eating too much CPU.
[
Log in to
get rid of this advertisement]
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
01-15-2009, 03:31 AM
#2
LQ Newbie
Registered: Aug 2007
Posts: 10
Thanked: 0
Original Poster
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
01-15-2009, 03:33 AM
#3
Member
Registered: Mar 2008
Distribution: fedora
Posts: 183
Thanked: 5
try using ""ps aux"
01-15-2009, 03:37 AM
#4
LQ Newbie
Registered: Aug 2007
Posts: 10
Thanked: 0
Original Poster
Quote:
Originally Posted by
chakka.lokesh
try using ""ps aux"
Thanks I'll try this when the situation pops-up again.
01-15-2009, 03:37 AM
#5
Member
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 306
Thanked: 14
I would have said "ps -ef"
01-15-2009, 03:55 AM
#6
Senior Member
Registered: Jun 2008
Location: India
Distribution: Ubuntu 8.10, RHEL, Fedora DS, Xandros, Mandriva Linux, Sun Solaris
Posts: 1,019
Thanked: 10
Me: ps -auxf
01-15-2009, 04:22 AM
#7
LQ Newbie
Registered: Aug 2007
Posts: 10
Thanked: 0
Original Poster
Thanks all for the suggestions. I'll try this when I get the chance and post the output.
01-16-2009, 02:59 AM
#8
Member
Registered: Jan 2009
Distribution: Debian Lenny, Ubuntu 9.04
Posts: 85
Thanked: 1
Quote:
Originally Posted by
jtbinuya
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
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 01:38 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News
LQ Podcast
LQ Radio