I had a problem recently, where a perl script was consuming server resources. I found out it was a perl script by using "top". But it didn't give the path to the script. Nor did ps
.
Also, ps -ef showed that the process with that pid is /usr/bin/httpd
(apache), so it must have been apache serving some perl page I suppose.
Is it possible to get the path to currently running perl script, if I only know the process PID of the perl process that is running that script? If so, how?
Clarification: I don't need the path to the perl binary, I need the path to the perl script that binary is currently executing.
ps aux
should tell you when the perl process was started, combine with Apache access logs to find the responsible script.