WHM Daily Process Logs - Top Processes

yellowhousedesi

Registered
Jan 12, 2012
4
0
51
cPanel Access Level
Root Administrator
I'm currently trying to investigate a high usage issue I'm running into on my server for a few accounts. Under the Daily Process Log, I am looking at the Top Processes and see the problem areas - but the actual process just says
PHP:
. Does anyone know of a tools that I can use to actually inspect an account to see what PHP processes are the hogs here? I've heard that xhprof could be a possibility - but want to make sure I'm using the right tool for the job. Thanks!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

First, check "WHM >> Service Configuration >> Configure PHP and SuExec" to see which handler you are using for PHP. You may want to consider switching to suPHP if it's not already enabled. Under this option, PHP scripts will be executed by the user who owns the VirtualHost serving the request.

The following document explains each PHP handler:

Apache PHP Request Handling

Also, does anything show up under "user" in the daily process log for this specific process?

Thank you.
 

yellowhousedesi

Registered
Jan 12, 2012
4
0
51
cPanel Access Level
Root Administrator
Hi,
Really appreciate the response. Yes, I currently am using suPHP as the PHP Handler. I do see the specific user account - which correlates to an account on my server. There's got to be some type of "magic tool" out there that can help me figure out why this account is using so many resources :)

It's a Joomla! site if that matters... Thanks!
 

Infopro

Well-Known Member
May 20, 2003
17,090
519
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
It could be an out of date Joomla itself or addon for that Joomla. If the Joomla is up to date proper, and it has some addon modules the user has added, have him disable them for a bit and see if load goes down. Have him check them for updates, and/or remove them. If you have ConfigServer Firewall installed it will alert you to scripts running out of control and can even be configured to kill it, wrap it and move it out of the way if needed.

It could very well be an out of date mod on the site. if its not the script itself causing issues it could be an attacker hitting that out of date script trying to get in.

I'd start by looking at the site and whats going in with it first before much else. Depending on the site owner's knowledge of maintaining the updates for the mods and site, you can sometimes find a real mess when you look closer at the files, names of the mods etc.
 

yellowhousedesi

Registered
Jan 12, 2012
4
0
51
cPanel Access Level
Root Administrator
Hi,
Thanks again for the response. I've made sure their J! install is up-to-date, so I think it's almost a matter of determining "the" component/php function that is so heavy, thus my quest for a magic tool that can profile php functions based on memory usage. Thanks!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Based on the discussion of xhprof at Profiling with XHProf – techPortal location, it seems that it might provide the debugging you are seeking for your PHP script. You might simply try installing it to see the results.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator

storminternet

Well-Known Member
Nov 2, 2011
460
0
66
cPanel Access Level
Root Administrator

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Why would there be harm in running a perl debugging script onto a shared machine? If you do not want it to be accessible, it could be password protected as I indicated in the guide. If you did not mean for security purposes, then please define what is meant by harm in this context. Thanks!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Are you going to install it on one account or all the accounts? If you install it on all the accounts, it might well cause an issue mainly due to the session data being written for many accounts who might utilize it, which would take up space in /tmp folder.

I cannot see most users using it, since it is a developer tool to track down coding function calls for improving the PHP code. As such, it is only really useful for someone developing code.