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.

SOLVED Determine which PHP script running from PID?

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

  1. DjordjeB

    DjordjeB Active Member

    Joined:
    Nov 24, 2014
    Messages:
    44
    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:
    37,171
    Likes Received:
    1,295
    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.
     
  3. DjordjeB

    DjordjeB Active Member

    Joined:
    Nov 24, 2014
    Messages:
    44
    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:
    37,171
    Likes Received:
    1,295
    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.
     
  5. DjordjeB

    DjordjeB Active Member

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

Share This Page