Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Determine which PHP script running from PID?

Discussion in 'General Discussion' started by DjordjeB, May 28, 2017.

  1. Gojko

    Gojko Well-Known Member

    Joined:
    Nov 24, 2014
    Messages:
    69
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Macedonia
    cPanel Access Level:
    Root Administrator
    i need to find out which PHP script running but i have only PID. Here is CSF:

    Code:
    Account: user
    Resource: Process Time
    Exceeded: 20101 > 2000 (seconds)
    Executable: /home/virtfs/user/opt/cpanel/ea-php56/root/usr/bin/php-cgi
    Command Line: /opt/cpanel/ea-php56/root/usr/bin/php-cgi
    PID: 16659 (Parent PID:15287)
    Killed: No
    as you can see here is a problem process time which is too long i can kill this process but it start again and that is not solutions

    CentOS 7.3 server
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,659
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The script's file name is not listed, but you should be able to identify the username of the account based on what's listed on the executable line. From there, you could review the files under the account to see which PHP scripts are installed. You may also find the domain access logs for the account helpful when checking to see which PHP files were accessed. They are stored in the following directory:

    Code:
    /var/log/apache2/domlogs/
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Gojko

    Gojko Well-Known Member

    Joined:
    Nov 24, 2014
    Messages:
    69
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Macedonia
    cPanel Access Level:
    Root Administrator
    Tnx for replay. Yes i have account name, but in log files are all php files of wordpress?
    i see literally every file for wordpress.
    so you say there is no chance to find out which file s running under that pid?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,659
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    That functionality is exclusive to suPHP with the "full_php_process_display" setting in the /etc/suphp.conf file.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Gojko

    Gojko Well-Known Member

    Joined:
    Nov 24, 2014
    Messages:
    69
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Macedonia
    cPanel Access Level:
    Root Administrator
    thank you, solved
     
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice