QSLOG(1)
π QSLOG(1) β the qslog man page, but make it make sense π
okay bestie, welcome to qslog β this is the page from the qslog man page, and I'm gonna walk you through it like we're texting at 2am. grab a snack π
β¨ NAME β¨
qslog β collects request statistics from access log data. that's it, that's the vibe, she's a stats girlie π
β¨ SYNOPSIS β¨
qslog -f <format_string> -o <out_file> [-p[c|u[c]] [-v]] [-x [<num>]]
[-u <name>] [-m] [-c <path>]
β¨ DESCRIPTION β¨
so qslog is a real time access log analyzer, no cap. she pulls the data in from stdin, and every minute she writes the output to the file you specified. here's literally everything she puts in there:
- requests per second (
r/s) - number of requests within measured time (
req) - bytes sent to the client per second (
b/s) - bytes received from the client per second (
ib/s) - response status codes within the last minute (
1xx,2xx,3xx,4xx,5xx) - average response duration (
av) - average response duration in milliseconds (
avms) - distribution of response durations in seconds within the last minute (
<1s,1s,2s,3s,4s,5s,>5s) - distribution of response durations faster than a second within the last minute (
0-49ms,50-99ms,100-499ms,500-999ms) - number of established (new) connections within the measured time (
esco) - average system load (
sl) - free memory (
m) β not available for all platforms, so don't come for her if it ghosts you π - number of client ip addresses seen withn the last 600 seconds (
ip) - number of different users seen withn the last 600 seconds (
usr) - number of events identified by the
'E'format character - number of mod_qos events within the last minute (
qV=create session,qv=VIP IP,qS=session pass,qD=access denied,qK=connection closed,qT=dynamic keep-alive,qL=request/response slow down,qs=serialized request,qA=connection abort,qU=new user tracking cookie)
β¨ OPTIONS β¨
-f <format_string>β defines the log data format and where all the data elements sit, so this utility knows what to chew on. peek at the'LogFormat'directive in yourhttpd.conffile to see how the server's access log data formats are defined, iykyk π
qslog knows the following elements:
Idefines the client ip address (%h)Rdefines the request line (%r)Sdefines HTTP response status code (%s)Bdefines the transferred bytes (%bor%O)idefines the received bytes (%I)Ddefines the request duration in microseconds (%D)tdefines the request duration in milliseconds (may be used instead ofD)Tdefines the request duration in seconds (may be used instead ofDort) (%T)kdefines the number of keepalive requests on the connection (%k)Udefines the user tracking id (%{mod_qos_user_id}e)Qdefines themod_qos_evevent message (%{mod_qos_ev}e)Cdefines the element for the detailed log (-coption), e.g."%U"sarbitrary counter to add up (sum within a minute)aarbitrary counter to build an average from (average per request)Aarbitrary counter to build an average from (average per request)Marbitrary counter to measure the maximum value reached (peak)Ecomma separated list of event stringsccontent type (%{content-type}o), available in-pcmode onlymrequest method (GET/POST) (%m), available in-pcmode only.defines an element to ignore (unknown string)
-o <out_file>β tells her which file to store the output in.stdoutis used if this option is not defined, so like, if you just wanna watch the chaos live π-pβ used for post processing when you're reading the log data from a file (cat/pipe).qslogis started using it's offline mode (extracting the time stamps from the log lines) so she can process existing log files. The option"-pc"may be used alternatively if you want to gather request information per client (identified by IP address (I) or user tracking id (U) showing how many request each client has performed within the captured period of time)."-pc"supports the format charactersIURSBTtDkMEcm. The option"-pu"collects statistics on a per URL level (supports format charactersRSTtD)."-puc"is very similar to"-pu"but cuts the end (handler) of each URL. slay, options on options π-vβ verbose mode. she will yap. π€-x [<num>]β rotates the output file once a day (move). You may specify the number of rotated files to keep. Default are14. β-u <name>β becomes another user, e.g.www-data.-mβ calculates free system memory every minute. π§-c <path>β enables the collection of log statistics for different request types.'path'specifies the necessary rule file. Each rule consists of a rule identifier and a regular expression to identify a request seprarated by a colon, e.g.,01:^(/a)|(/c). The regular expressions are matched against the log data element which has been identified by the'C'format character.
β¨ VARIABLES β¨
the following environment variables are known to qslog:
QSEVENTPATH=<path>β defines a file containing a comma or new line separated list of known event strings expected within the log filed identified by the'E'format character.QSCOUNTERPATH=<path>β defines a file containing a by new line separated list of rules which reflect possibleQS_ClientEventLimitCountdirective settings (for simulation purpose /-pcoption). The'E'format character defines the event string in the log to match (literal string) the'event1'and'event2'event names against.
Rule syntax: <name>:<event1>-<n>*<event2>/<duration>=<limit>
'name'defines the name you have given to the rule entry and is logged along with with the number of times the'limit'has been reached within the'duration'.'event1'defines the variable name (if found in'E') to increment the counter.'event2'defines the variable name (if found in'E') to decrement the counter (and the parameter'n'defines by how much).'duration'defines the measure interval (in seconds) used for theQS_ClientEventLimitCountdirective.'limit'defines the threshold (number) defined for theQS_ClientEventLimitCountdirective.
Note: If the'name'parameter is prefixed by'STATUS', the rule is applied against the HTTP status code'S'and the'event1'string shall contain a list of relevant status codes separated by an underscore (while'event2'is ignored). π
β¨ EXAMPLE β¨
Configuration using pipped logging:
CustomLog "|/usr/bin/qslog -f ISBDQ -x -o /var/log/apache/stat.csv"
"%h %>s %b %D %{mod_qos_ev}e"
Post processing:
LogFormat "%t %h \"%r\" %>s %b \"%{User-Agent}i\" %T"
cat access.log | qslog -f ..IRSB.T -o stat.csv -p
β¨ SEE ALSO β¨
qsgeo(1), qsre(1), qsrespeed(1) β go read those too, bestie, you'll be obsessed π¦
β¨ AUTHOR β¨
Pascal Buchbinder, http://mod-qos.sourceforge.net/ β king behavior honestly π
and that's the whole thing!! this is mod_qos utilities 11.79, dated May 2026, and it lives at QSLOG(1). mwah, go analyze those logs, main character πβ¨π
π¦ where this page comes from
- ubuntu stonking: libapache2-mod-qos 11.79-1build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms