Results 1 to 8 of 8
-
03-30-2004, 03:34 PM #1Junior Guru Wannabe
- Join Date
- Nov 2003
- Location
- North Carolina
- Posts
- 39
mysql running at 99.9% cpu, what do i do?
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
988 mysql 15 0 25068 10M 1240 S 99.9 2.1 2:39 0 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/m
how can i find out what is using so much resources?
I also was told by my datacenter that they detected IRC bots running on one of my servers, i have WHM check and close them but that is not enough i guess.
I thought my server was fully managed but they want me to find the IRC bots and remove the accounts using them. Can anyone tell me where to start?
I searched bots and irc bots on these forums and on a couple other forums and found nothing helpful, any tips would be great, thanks!Bryan
-
03-30-2004, 03:37 PM #2WHT Addict
- Join Date
- Apr 2002
- Location
- Cornfield
- Posts
- 131
You can do
mysqladmin -u root -p proc
to show the mysql processlist, which is a listng of all queries currnetly running.Fire extinguisher extraordinare
-------------------------------
FastServers.Net NOC Admin
-
03-30-2004, 03:40 PM #3Junior Guru Wannabe
- Join Date
- Nov 2003
- Location
- North Carolina
- Posts
- 39
hmmm... my root password is not working... could it be another password to give me access to that report?
Bryan
-
03-30-2004, 03:44 PM #4Junior Guru Wannabe
- Join Date
- Nov 2003
- Location
- North Carolina
- Posts
- 39
lol, yeah was typing in the wrong terminal (using a FC1 box @ home).
I get a message mysqladmin: command not found (when typing it at the server's terminal)Bryan
-
03-30-2004, 06:14 PM #5Junior Guru Wannabe
- Join Date
- Nov 2003
- Location
- North Carolina
- Posts
- 39
root@lx1 [~]# mysqladmin -u root -p proc
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'
root@lx1 [~]#
Ok, it is not letting me in (and i am trying on the right box). Any ideas?Bryan
-
03-30-2004, 06:36 PM #6learning is in the doing
- Join Date
- Sep 2000
- Location
- Alberta, Canada
- Posts
- 3,146
Once logged in as 'root':
mysqladmin processlist
Another helpful one:
mysqladmin status
I also wouldn't be too worried about: 99.9 2.1 2:39 0 /usr/sbin/mysqld
For all we know that is the mySQL daemon. More important to watch TOP as a whole, and go by what that says.• PotentProducts.com - for all your Hosting needs
• Helping people Host, Create and Maintain their Web Site
• ServerAdmin Services also available
-
03-30-2004, 07:37 PM #7Junior Guru Wannabe
- Join Date
- Nov 2003
- Location
- North Carolina
- Posts
- 39
ok, here are those reports... my main concern was something was not right with mySQL taking up so much CPU cycles but if that is normal i feel a little better.
root@lx1 [~]# mysqladmin processlist
+---------+-----------------+-----------+-------------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+---------+-----------------+-----------+-------------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| 2 | eximstats | localhost | eximstats | Sleep | 83 | | |
| 1248151 | x | localhost | x | Sleep | 466 | | |
| 1248153 | x | localhost | x | Sleep | 466 | | |
| 1248157 | x | localhost | x | Sleep | 465 | | |
| 1248163 | x | localhost | x | Sleep | 464 | | |
| 1248164 | x | localhost | x | Sleep | 464 | | |
| 1248293 | xr | localhost | x | Sleep | 438 | | |
| 1248303 | x | localhost | x | Sleep | 438 | | |
| 1249984 | root | localhost | | Sleep | 262 | | |
| 1252141 | x | localhost | x | Query | 1 | Copying to tmp table | SELECT
c.id as id,
c.nick as nick,
COUNT(f.id) AS fotos
FROM cadastro c
LEF |
| 1252147 | root | localhost | | Query | 0 | | show processlist |
+---------+-----------------+-----------+-------------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
root@lx1 [~]# mysqladmin status
Uptime: 277399 Threads: 14 Questions: 6116695 Slow queries: 5087 Opens: 210000 Flush tables: 1 Open tables: 64 Queries per second avg: 22.050
and here is top:
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
988 mysql 15 0 25360 10M 1360 S 99.9 2.0 2:55 0 mysqld
3290 root 15 0 3292 2984 624 S 4.9 0.5 3:21 0 httpd
7 root 15 0 0 0 0 SW 0.1 0.0 2:45 0 kscand/Normal
31329 root 15 0 1152 1152 868 R 0.1 0.2 0:00 0 top
1 root 15 0 108 80 56 S 0.0 0.0 0:04 0 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
3 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kapmd
4 root 34 19 0 0 0 SWN 0.0 0.0 0:02 0 ksoftirqd_CPU0
9 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush
5 root 15 0 0 0 0 SW 0.0 0.0 0:03 0 kswapd
6 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kscand/DMA
8 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kscand/HighMem
10 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kupdated
11 root 23 0 0 0 0 SW 0.0 0.0 0:00 0 mdrecoveryd
15 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
73 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 khubd
281 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
282 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
283 root 15 0 0 0 0 SW 0.0 0.0 0:06 0 kjournald
284 root 15 0 0 0 0 SW 0.0 0.0 0:17 0 kjournald
thanks for the help!Last edited by Tagged; 03-30-2004 at 07:50 PM.
Bryan
-
03-30-2004, 07:44 PM #8learning is in the doing
- Join Date
- Sep 2000
- Location
- Alberta, Canada
- Posts
- 3,146
I wouldn't be publishing Client info to a public Forum.
processlist looks fine
status shows some use but within acceptable limits
top is not showing the very top information -- which is the most helpful part
No need to post information though, unless still having problems.Last edited by anon-e-mouse; 03-31-2004 at 07:34 AM.
• PotentProducts.com - for all your Hosting needs
• Helping people Host, Create and Maintain their Web Site
• ServerAdmin Services also available