Portal Home > Knowledgebase > Articles Database > httpd processes running top or ps?
httpd processes running top or ps?
Posted by joeshacks, 02-05-2008, 02:11 AM |
okay.. so here is a simple question that i just can't seem to figure out.. when i run the command top or ps -auxw.. they show the httpd processes as the command httpd or /usr/sbin/httpd, but how do i know what file that is? is there anyway to find out what file that is actually getting executed or served?
|
Posted by jpetersen, 02-05-2008, 02:46 AM |
As root: readlink /proc/pid/exe
where "pid" is the process id of the process. Example below using process id 4337:
Another way is via the "lsof" command:
You can also get more info on a process by snooping around in the /proc/pid directory for the process:
You can also include the "e" argument to ps auxw to show some environmental information about the pid:
Want to learn more about what a process is doing? Use the "strace" command:
ctrl+c will stop the tracing of the process. Likewise, you can use ltrace to observe library action from the process:
|
Posted by david510, 02-05-2008, 04:12 AM |
You can check the apache access_logs/error_log to see which all files are served currently.
tail -f /usr/local/apache/log/access_logs
|
Add to Favourites Print this Article
Also Read
PhpMyAdmin (Views: 516)