|
|||
|
how to display httpd processes of current login user
Sir,
I am working in php. I have create cPanel plugin. I want display httpd processes of current login user. Using unix command ps -ef | grep httpd it give me following output OUTPUT :- root 23972 1 0 Jul06 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL root 24017 23972 0 Jul06 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 24024 23972 0 Jul06 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 24025 23972 0 Jul06 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 24027 23972 0 Jul06 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 24028 23972 0 Jul06 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 24029 23972 0 Jul06 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 25862 23972 0 Jul06 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 14286 23972 0 Jul07 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 14297 23972 0 Jul07 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 14298 23972 0 Jul07 ? 00:00:00 /usr/local/apache/bin/httpd -k start -DSSL jholco 20017 20008 0 12:30 ? 00:00:00 sh -c ps -ef | grep httpd jholco 20019 20017 0 12:30 ? 00:00:00 grep httpd Current login user is jholco. I want to display only jholco's process. Please help me. How can i display it. Thanks, |
|
||||
|
Quote:
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
||||
|
Quote:
![]() If you "ps -ef" the Apache server, the only thing you are going to get back is user "nobody" daemons that tell you pretty much nothing! You can call the queue information from Apache to see what is currently being viewed but that won't tell you which user ; only which web site and pages currently being viewed. If you want to see what scripts are being run by a particular user which is what it sounds like you are trying to do then you don't want to run any "ps" commands but rather you would want to "grep" the following log files for the username you want: Log that shows normal CGI scripts (perl) that have been run: Code:
/usr/local/apache/logs/suexec_log Code:
/usr/local/apache/logs/suphp_log it also shows you the UID number for the user the script ran under and that can be cross referenced with the UID numbers in /etc/passwd if you want to make sure the script was indeed run from the user shown in the path such as "/home/(username)/...".
__________________
My Server Expert: Server support, security, and management! |
![]() |
| Tags |
| httpd |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script to Display the current Server Load | chican0 | cPanel and WHM Discussions | 3 | 03-02-2005 07:13 PM |
| Show Current Running Processes | racomnet | cPanel and WHM Discussions | 1 | 12-29-2004 09:22 AM |
| 100+ current mysql processes | chadi | cPanel and WHM Discussions | 1 | 08-05-2004 12:00 AM |
| httpd processes and user nobody - who is using it? | pingo | cPanel and WHM Discussions | 3 | 03-10-2003 11:39 AM |