1QSDT(1)                          qsdt man page                         QSDT(1)
2
3
4

NAME

6       qsdt calculates the elapsed time between two related log messages.
7

SYNOPSIS

9       qsdt [-t <regex>] -i <regex> -s <regex> -e <regex> [-v] [<path>]
10

DESCRIPTION

12       qsdt  is  a  simple tool to search two different messages in a log file
13       and calculates the elapsed time between these lines. The two  log  mes‐
14       sages need a common identifier such an unique request id (UNIQUE_ID), a
15       thread id, or a transaction code.
16

OPTIONS

18       -t <regex>
19              Defines a pattern (regular expression) matching the  log  line's
20              timestamp.  The  pattern  must  include two sub-expressions, one
21              matching hours, minutes and seconds the other matching the  mil‐
22              liseconds.             Default             pattern            is
23              ([0-9]{2}:[0-9]{2}:[0-9]{2})[.,]([0-9]{3})
24
25       -i <regex>
26              Pattern (regular expression) matching the identifier  which  the
27              two messages have in common. The sub-expression defines the part
28              which needs to be extracted from the matching string. Note:  You
29              can  also  use the start (-s) and end (-e) pattern to define the
30              sub-expression matching this identifier.
31
32       -s <regex>
33              Defines the pattern (regular expression or literal string) iden‐
34              tifying the first (start) of the two messages.
35
36       -e <regex>
37              Defines the pattern (regular expression or literal string) iden‐
38              tifying the second (end) of the two messages.
39
40       -v     Verbose mode.
41
42       <path> Defines the input file to process. qsdt reads from from standard
43              input if this parameter is omitted.
44

EXAMPLE

46       Sample command line arguments:
47
48         -i  '  ([a-z0-9]+)  [A-Z]+  '  -s  'Received  Request'  -e  'Received
49       Response'
50
51        matching those sample log messages:
52         2018-03-12 16:34:08.653 threadid23 INFO Received Request
53         2018-03-13  16:35:09.891  threadid23  DEBUG  MessageHandler  Received
54       Response
55
56

NOTE

58       The four patterns (t,i,s,e) are concatenated into two search patterns:
59        first (start): [t (HH:MM:SS)(SSS) ].*[i (id) ].*[s ]
60        second (end):  [t (HH:MM:SS)(SSS) ].*[i (id) ].*[e ]
61
62       And  the three sub-expression are used to extract the timestamp and the
63       unique identifier that the start and end message have in  common.  This
64       means  that you could specify the sub-expression for the unique identi‐
65       fier in the start (-s) or end (-e) pattern alternatively, e.g. in  case
66       the identifier is at the end of the log line.
67

SEE ALSO

69       qsexec(1),  qsfilter2(1),  qsgeo(1),  qsgrep(1),  qshead(1),  qslog(1),
70       qslogger(1), qspng(1), qsre(1), qsrespeed(1),  qsrotate(1),  qssign(1),
71       qstail(1)
72

AUTHOR

74       Pascal Buchbinder, http://mod-qos.sourceforge.net/
75
76
77
78mod_qos utilities 11.66            May 2020                            QSDT(1)
Impressum