alluoshi Posted November 24, 2008 Share Posted November 24, 2008 Hello, I have a multi-user web application installed on Linux machine. Users can access this application from their browsers through Apache 2 and php 5. For example, this application is Mysql and users can access this application using phpmyadmin tool. My main goal is to measure software usage of this application for each user. For example, if user1 used this application (Mysql in our case) for 40 minutes, I want to measure the User CPU time, the System CPU time, the idle time and the elapsed time (40 minutes in this case) for each user. I installed Apache, php and Mysql on a Linux machine and clients started to use Mysql using phpmyadmin. I was monitoring the processes on the server using "top" command and I noticed for each time a user accesses Mysql, an Apache process is up with user "www-data" and mysql process with user "mysql". Now if many users are accessing Mysql at the same time, I can see Apache and mysql processes with the same user (www-data for apache and mysql for mysql). I tried to know which user/users is responsible for creating these processes but I couldn't. (while sitting on the Linux machine) As I understand (please correct me if I am mistaken), for each time a user is using phpmyadmin to access mysql, Apache creates a thread. Eventually, this thread is responsible for creating other threads/processes on the Linux server. How can I track this thread (that Apache creates for each HTTP request) so that I can know the threads and processes that were created because of this Apache thread. I would appreciate your help Quote Link to comment https://forums.phpfreaks.com/topic/133990-tracing-apache2-threads/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.