1QSEXEC(1) qsexec man page QSEXEC(1)
2
3
4
6 qsexec - parses the data received via stdin and executes the defined
7 command on a pattern match.
8
9
11 qsexec -e <pattern> [-t <number>:<sec>] [-c <pattern> [<command
12 string>]] [-p] [-u <user>] <command string>
13
15 qsexec reads log lines from stdin and searches for the defined pattern.
16 It executes the defined command string on pattern match.
17
19 -e <pattern>
20 Specifes the search pattern causing an event which shall trigger
21 the command.
22
23 -t <number>:<sec>
24 Defines the number of pattern match within the the defined num‐
25 ber of seconds in order to trigger the command execution. By
26 default, every pattern match causes a command execution.
27
28 -c <pattern> [<command string>]
29 Pattern which clears the event counter. Executes optionally a
30 command if an event command has been executed before.
31
32 -p Writes data also to stdout (for piped logging).
33
34 -u <name>
35 Become another user, e.g. www-data.
36
37 <command string>
38 Defines the event command string where $0-$9 are substituted by
39 the submatches of the regular expression.
40
42 Executes the deny.sh script providing the IP address of the client
43 causing a mod_qos(031) messages whenever the log message appears 10
44 times within at most one minute:
45 ErrorLog "|/usr/bin/qsexec -e \'mod_qos\(031\).*,
46 c=([0-9a-zA-Z:.]*)\' -t 10:60 \'/usr/local/bin/deny.sh $1\'"
47
48
50 qsdt(1), qsfilter2(1), qsgeo(1), qsgrep(1), qshead(1), qslog(1), qslog‐
51 ger(1), qspng(1), qsre(1), qsrespeed(1), qsrotate(1), qssign(1),
52 qstail(1)
53
55 Pascal Buchbinder, http://mod-qos.sourceforge.net/
56
57
58
59mod_qos utilities 11.64 September 2019 QSEXEC(1)