The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

proc list only shows "/usr/bin/php" - no more file names???

Discussion in 'General Discussion' started by qwerty, Jan 8, 2008.

  1. qwerty

    qwerty Well-Known Member

    Joined:
    Jan 21, 2003
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    16
    We've updated our servers recently using easyapache to the latest php4 and mod_suphp and I've noticed that in top (running "top c" in shell) all php processes by any user are simply displayed as "/usr/bin/php"

    Before this update the processes also showed the file name eg. /usr/bin/php - lamescript.php which allowed to easily find troublesome scripts ... but now there's no way of knowing what the script in question is that's eating up 100% of the cpu .. or is there?
     
    #1 qwerty, Jan 8, 2008
    Last edited: Jan 8, 2008
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You'd have to check in /proc/PID/ and see if it's mentioned, often it isn't. lsof might help, but that only uses the information from /proc/ it's not something cPanel controls, it's how linux works under those conditions.
     
  3. qwerty

    qwerty Well-Known Member

    Joined:
    Jan 21, 2003
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    16
    Yeah but like I said, until the most recent updates "top c" showed exactly which script was being run - for each php process. Now all it shows is /usr/bin/php making it impossible to tell what the script is that's consuming all cpu/memory whatever...

    The only solution is to suspend the entire account but then when the account holder contacts you, you can't even tell them WHICH script was causing issues.

    Until very recently this was not so, so why / what changed ?
     
  4. jdlightsey

    jdlightsey Perl Developer III
    Staff Member

    Joined:
    Mar 6, 2007
    Messages:
    126
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Houston Texas
    cPanel Access Level:
    Root Administrator
    The difference lies in how mod_suphp passes the script name to the PHP CGI binary compared to how PHPSuexec was doing it. PHPSuexec was passing the script name to the PHP interpreter as the first argument. Mod_suphp passes it in the SCRIPT_FILENAME environmental variable.
     
  5. qwerty

    qwerty Well-Known Member

    Joined:
    Jan 21, 2003
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    16
    I'm pretty sure we were using mod_suphp for a while before the last easyapache upgrade we performed .. but I could be wrong (maybe we were still using phpsuexec...hmm)
     
Loading...

Share This Page