Jump to content

Recommended Posts

Posted

I keep getting these emails:

 

IMPORTANT: Do not ignore this email.

This is cPanel stats runner on basilisk.vitruvianarts.com!

While processing the log files for user petabuse, the cpu has been

maxed out for more then a 6 hour period. The current load/uptime line on the server at the time of

this email is

14:15:49 up 22 days, 17:34, 0 users, load average: 1.02, 6.16, 8.10

You should check the server to see why the load is so high and take

steps to lower the load. If you want stats to continue to run even with a high load; Edit

/var/cpanel/cpanel.config and change extracpus to a number larger then 0 (run

/usr/local/cpanel/startup afterwards to pickup the changes).

 

I have also noticed mySQL taking up considerably more memory than it should at times - and I'm wondering what are the most direct steps I can take to isolate the problem? (I know a million things I *can* do - but I'm hoping for some experienced advice on what I *should* do... LOL) How do I figure out what script or set of scripts is the culprit here?

Posted (edited)

From a shell while the load is high:

 

First identify if mysql is the process eating up the CPU by running "top" and watching for what processes stick at the top of the list.

 

If mysql is showing a lot of cpu usage, as root run "mysqladmin processlist" to show what processes are running in the database, and from that table you see, you might be able to track down the culprits. You can also run "mysqladmin status" to see how many slow queries show up.

 

If it's something else like a long running httpd (apache) process running, you can get some info by taking the process id (PID ... first number listed in "top" next to the process) and run an "lsof -p #" where # is the PID. This will show you all open files for that process and who's connected to it. There will be a lot of junk listed (like all your domlogs will show up)... what you are really looking for is things like "/home/someaccount/public_html/..." to find out which account the process is accessing, and you should also see what remote system is connected to that process (look for the :http connection). Those might help you track it down if your willing to dig enough (you can often go from there to your domlogs and look at what the traffic is accessing).

 

If it's just an external script that's eating up CPU (like a cron job), it should be pretty obvious in top.

 

As you said, there are many other things you can do, but there's a couple basic ones that might get you started.

 

P.S... a load of 1 isn't necessarily bad, but seeing your 15 minute load average at 8 definitely means you do have something pretty intensive running on there.

Edited by TCH-MikeJ

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...