Jump to content

Tracing Apache2 threads


alluoshi

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.