SOLVED Determine which PHP script running from PID?

Gojko

Well-Known Member
Nov 24, 2014
112
7
68
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
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.
 

Gojko

Well-Known Member
Nov 24, 2014
112
7
68
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello,

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

Thank you.