-
-
Notifications
You must be signed in to change notification settings - Fork 2
logselect.8
logselect - select parts of logs created by multilog(8)
under tcpserver xargs -e EOF logselect
To use logselect you can create a service whose run file looks like this: #!/bin/sh QMAILDUID=`id -u qmaill` NOFILESGID=`id -g qmaill` exec softlimit -m 2000000 tcpserver -p -x cdb -u QMAILDUID -g $NOFILESGID 0 642 /usr/bin/xargs -e EOF /usr/bin/logselect
In addition, the service directory should have symlinks pointing to the log files you wish to make accessible.
Then, to fetch logs, you make a connection to port 642, and stuff four lines down the TCP connection. The first line contains the name of the symlink you created. The second contains a TAI64N for the start of the period of interest. The third contains a TAI64N for the stop of the period of interest. The fourth contains the literal string "EOF". All lines in the log file after the start but before the stop will be returned.