LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-06-2008, 12:31 PM   #1
ral0r3us
LQ Newbie
 
Registered: Jul 2008
Posts: 6

Rep: Reputation: 0
Question Apache Metrics


Hello,
I need to create a Control Unit for the Apache server (v1.3.41) which will minimize the response times (server side) by altering online the MaxClients and KeepAliveTimeout Directives (will alter and do a graceful restart every time they need to be altered). The problem is that i cant find a way to extract the proper metrics such as Hits/sec Requests/sec Simultaneous Connections/sec Server Response time Per Connection etc. Anyone has any idea where to look?
 
Old 07-06-2008, 12:55 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Perhaps apachetcl fullstatus, with the mod_status module installed.

man apachectl

search for fullstatus

http://httpd.apache.org/docs/1.3/mod/mod_status.html
 
Old 07-06-2008, 01:01 PM   #3
simonapnic
Member
 
Registered: Jul 2008
Posts: 70

Rep: Reputation: 16
Post

From what I can see, you are trying to benchmark your httpd ?
If so, you can use a tool called 'ab'.
http://httpd.apache.org/docs/2.0/programs/ab.html
Also, mod_status could be useful.
 
Old 07-06-2008, 02:11 PM   #4
ral0r3us
LQ Newbie
 
Registered: Jul 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Unhappy Re:Apache Metrics

Well i considered parsing data from ./apachectl status but it only gives information about the following: requests/sec - B/second - B/request. If i run a benchmark i'll get info for a single config, the point is that i need to know how long (how loaded is the server) takes apache to serve the requests (aka Response Time), that way i'll be able to apply this as feedback to my Controller and give it a hint to adjust the MaxClients and KeepAliveTimeout Directives. All this has to be done while the server is on Production Status. Now i know there is (somewhere i cant find ) a module called mod_rt that is supposed to output that kind of info... but it's nowhere to be found

P.S. Thank you for your replies though

Last edited by ral0r3us; 07-06-2008 at 02:22 PM.
 
Old 07-06-2008, 02:17 PM   #5
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Did you enable ExtendedStatus , and use apachectl fullstatus ?
 
Old 07-06-2008, 03:01 PM   #6
ral0r3us
LQ Newbie
 
Registered: Jul 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Re:Apache Metrics

Quote:
Originally Posted by Mr. C. View Post
Did you enable ExtendedStatus , and use apachectl fullstatus ?
Yes i did that of course.
Code:
ExtendedStatus On
I used both ways
Code:
./apachectl status
and
Code:
./apachectl fullstatus
neither approach gave me the server responce time though. The following is the output of ./apachectl fullstatus.
Code:
                     Apache Server Status for 192.168.1.11

   Server Version: Apache/1.3.41 (Unix)
   Server Built: Jul 4 2008 20:56:58
     _________________________________________________________________

   Current Time: Sunday, 06-Jul-2008 22:58:55 EEST
   Restart Time: Sunday, 06-Jul-2008 22:00:19 EEST
   Parent Server Generation: 0
   Server uptime: 58 minutes 36 seconds
   Total accesses: 4 - Total Traffic: 14 kB
   CPU Usage: u0 s0 cu0 cs0
   .00114 requests/sec - 4 B/second - 3584 B/request
   1 requests currently being processed, 4 idle servers
____W...........................................................
................................................................
................................................................
................................................................

   Scoreboard Key:
   "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
   "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
   "L" Logging, "G" Gracefully finishing, "." Open slot with no current
   process

   Srv PID Acc M CPU SS Req Conn Child Slot Host VHost Request
   0-0 6264 0/1/1 _ 0.00 3515 26 0.0 0.00 0.00 localhost 192.168.1.11 GET
   /server-status HTTP/1.0
   1-0 6265 0/1/1 _ 0.00 3515 0 0.0 0.00 0.00 localhost 192.168.1.11 GET
   /server-status HTTP/1.0
   2-0 6266 0/1/1 _ 0.00 3515 0 0.0 0.00 0.00 localhost 192.168.1.11 GET
   /server-status HTTP/1.0
   3-0 6267 0/1/1 _ 0.00 3515 0 0.0 0.00 0.00 localhost 192.168.1.11 GET
   /server-status HTTP/1.0
   4-0 6268 0/0/0 W 0.00 3515 101409542 0.0 0.00 0.00 127.0.0.1
   192.168.1.11 GET /server-status HTTP/1.0
     _________________________________________________________________

    Srv  Child Server number - generation
    PID  OS process ID
    Acc  Number of accesses this connection / this child / this slot
     M   Mode of operation
    CPU  CPU usage, number of seconds
    SS   Seconds since beginning of most recent request
    Req  Milliseconds required to process most recent request
   Conn  Kilobytes transferred this connection
   Child Megabytes transferred this child
   Slot  Total megabytes transferred this slot
     _________________________________________________________________
 
Old 07-06-2008, 03:50 PM   #7
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Hmmm, well, you might need to refine "server responce" [sic] / Response Time. Are you looking for:

- transactions per second
- time until service of connection beings (latency)
- time taken to complete transaction (depends upon payload size)
- average transactions / second (regardless of payload size)
- average per worker thread/process? per server ?

I don't know of any modules that give you what you are asking.
 
Old 07-06-2008, 05:00 PM   #8
ral0r3us
LQ Newbie
 
Registered: Jul 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by Mr. C. View Post
Hmmm, well, you might need to refine "server responce" [sic] / Response Time. Are you looking for:

- transactions per second
- time until service of connection beings (latency)
- time taken to complete transaction (depends upon payload size)
- average transactions / second (regardless of payload size)
- average per worker thread/process? per server ?

I don't know of any modules that give you what you are asking.
Yep all of the above except the last one which is way too much process intensive and rather useless since can be inferred by the others on average. Actually i can get all these information by parsing the data of a packet sniffer but my hunch is that it has to be an easier way to do that, plus if i employ that solution i'll be utilizing at least 5-10% of the server's resources (CPU and RAM) only to get info about the metrics
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux vs. Windows Metrics -- Nothing Is Quite What It Seems To Be LXer Syndicated Linux News 0 05-02-2008 02:40 AM
LDAP Metrics cmontr Linux - General 0 01-24-2008 09:19 AM
LXer: Fedora's metrics have ripple effect LXer Syndicated Linux News 0 01-30-2007 06:21 AM
Industry standard performance metrics for Linux bkrueger Linux - General 1 03-20-2006 12:55 PM
Cedega font metrics GT_Onizuka Linux - Games 4 10-13-2004 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration