mod_qos, qslog

 

qslog is a support utility of mod_qos. It may be used to gather request statistics from Apache's access log data.

Usage: qslog -f <format_string> -o <out_file> [-p [-v]] [-x] [-u <name>]

Summary
qslog is a real time access log analyzer. It collects
the data from stdin. The output is written to the specified
file every minute. The output includes the following entries:
  - requests per second (r/s)
  - bytes (http body data) sent to the client per second (b/s)
  - average response duration (av)
  - distribution of response durations within the last minute
    (<1s,1s,2s,3s,4s,5s,>5)
  - average system load (sl)
  - free memory (m) (not available for all platforms)
  - number of client ip addresses seen withn the last 600 seconds (ip)
  - number of mod_qos events within the last minute (qv=create session,
    qs=session pass, qd=access denied, qk=connection closed, qt=dynamic
    keep-alive, ql=request/response slow down)

Options
  -f <format_string>
     Defines the log data format and the positions of data
     elements processed by this utility.
     See to the 'LogFormat' directive of the httpd.conf file
     to see the format defintions of the servers access log
     data. qslog knows the following elements:
     . defines an element to skip (string)
     T defines the request duration (%T)
     B defines the transferred bytes (%b)
     R defines the request line (%r)
     I defines the client ip address (%h)
     Q defines the mod_qos_ev event message (%{mod_qos_ev}o)
  -o <out_file>
     Specifies the file to store the output to.
  -p
     Reads the log data from a file. Used to start the
     utility in offline mode in order to process existing log
     files (post processing).
  -v
     Verbose mode.
  -x
     Rotates the output file once a day (move).
  -u <name>
     Become another user, e.g. nobody.

Example configuration using pipped logging:
  LogFormat "%t %h \"%r\" %>s %b \"%{User-Agent}i\" %T"
  TransferLog "|./bin/qslog -f ..IR.B.T -o ./logs/stat_log"

Example for post processing:
  cat access_log | ./bin/qslog -f ..IR.B.T -o ./logs/stat_log -p



mod_qos at SourceForge.net © 2007-2008, Pascal Buchbinder