hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : mysql usage: high CPU %, how do i find out who's using what?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

mysql usage: high CPU %, how do i find out who's using what?

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-03-2008, 09:42 AM
chamelion chamelion is offline
Web Hosting Evangelist
 
Join Date: Aug 2005
Posts: 528

mysql usage: high CPU %, how do i find out who's using what?


title says it all

just noticed mysql cpu usage has shot up from its usual 5-10% cpu to 30%+. domains are as normal and no extraordinary php processes.

any way i can tell what users are most heavily running mysql? (as in number queries / slow queries etc?) i know mysqladmin processlist but that only gives me a snapshot, whereas i want to see over 24 hours, who used mysql the most...

any help appreciated
thanks!

Reply With Quote


Sponsored Links
  #2  
Old 08-03-2008, 10:03 AM
ub3r ub3r is offline
Disabled
 
Join Date: Dec 2002
Location: chica go go
Posts: 11,858
look at your mysql processlist.

Reply With Quote
  #3  
Old 08-03-2008, 10:03 AM
chamelion chamelion is offline
Web Hosting Evangelist
 
Join Date: Aug 2005
Posts: 528
quote from my original post:

Quote:
i know mysqladmin processlist but that only gives me a snapshot, whereas i want to see over 24 hours, who used mysql the most...

Reply With Quote
Sponsored Links
  #4  
Old 08-03-2008, 10:07 AM
Thomas Thomas is offline
Web Hosting Master
 
Join Date: Jun 2006
Location: London, Manchester
Posts: 631
Check MySQL log file /usr/local/mysql/var

Reply With Quote
  #5  
Old 08-03-2008, 06:39 PM
xbox360 xbox360 is offline
Junior Guru Wannabe
 
Join Date: Mar 2008
Posts: 78
I'm sure mytop is very handy in this case.

Reply With Quote
  #6  
Old 08-03-2008, 06:43 PM
RBBOT RBBOT is offline
Web Hosting Evangelist
 
Join Date: Dec 2006
Posts: 477
The only way to get detailed per-user stats other than logging every query is compile in the patches Google have made to mysql.

Reply With Quote
  #7  
Old 08-03-2008, 07:41 PM
ISPserver ISPserver is offline
Web Hosting Guru
 
Join Date: Aug 2002
Posts: 308
Usually if database index crashed mysql use a lot of CPU. Try to fix index with myisamchk see to

http://dev.mysql.com/doc/refman/5.0/en/check.html

It work only if your use MyISAM tables.

__________________
MiniVDS.com - Extremely low prices at small VPS (Linux and FreeBSD)
ISPsystem - Offers a flexible and affordable hosting solution

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Open Data Center Alliance Adds Frameworks for Software Entitlement, Data Security Web Hosting News 2013-03-14 15:33:01
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Indian Web Host ESDS Launches Cloud Platform eNlight Web Hosting News 2011-11-21 18:39:44
Web Host FireHost Partners with Cloud Security Firm Gazzang for Data Encryption Web Hosting News 2011-08-16 20:33:43
SSL Certificate Authority GlobalSign Launches CloudSSL Product Web Hosting News 2011-08-12 19:33:59


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?