diff options
Diffstat (limited to 'addts.1')
-rw-r--r-- | addts.1 | 78 |
1 files changed, 78 insertions, 0 deletions
@@ -0,0 +1,78 @@ +.TH ADDTS 1 "June 20, 2018" ADDTS "User Commands" +.SH NAME +addts \- add timestamps at the beginning of each line +.SH SYNOPSIS +.nh +.na +\fBaddts\fR\ + [\fB\-au\fR]\ + [\fB\-f \fIFMT\fR]\ + [\fB\-i \fINUM\fR]\ + [\fB\-w \fICHR\fR]\ + [\fIFILE\fR] +.PP +\fBaddts\fR \fB\-?\fR +.ad +.hy +.SH DESCRIPTION +Reads standard input and writes it to standard output, adding a +timestamp at the begginning of each line. If \fIFILE\fR is suppied, +writes to it instead. Typical usage is for Apache forensic log: +.PP +.EX +ForensicLog "|/usr/bin/addts -a /var/log/httpd/forensic.log" +.EE +.SH OPTIONS +.TP +.B \-a +Append to \fIFILE\fR. Without this option, \fIFILE\fR is truncated +after opening. +.TP +.BI \-f " FMT" +Define timestamp format. \fIFMT\fR is a +.BR strftime (3) +format string, with an additional format conversion specifier +.BR %@ , +which is replaced with micronseconds. +.sp +See also \fB\-w\fR, below. +.TP +.BI \-i " NUM" +Pass first \fINUM\fR lines unchanged. +.TP +.B \-u +Report times in UTC. +.TP +.BI \-w " CHR" +Replace each occurrense of character \fICHR\fR in format string with +single whitespace. Use this option if your Apache version is unable to +correctly process quoted arguments in the \fBForensicLog\fR statement. +Example usage (newlines added for readability): +.sp +.EX +ForensicLog "|/usr/bin/addts -w_ -f %Y-%m-%d_%H:%M:%S.%@:_ \\ + -a /var/log/httpd/forensic.log" +.EE +.SH BUGS +Formatted timestamp cannot be longer than 511 bytes. +.SH "SEE ALSO" +.BR strftime (3). +.SH AUTHORS +Sergey Poznyakoff <gray@gnu.org.ua>. +.SH COPYRIGHT +Copyright \(co 2018 Sergey Poznyakoff +.br +.na +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> +.br +.ad +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.\" Local variables: +.\" eval: (add-hook 'write-file-hooks 'time-stamp) +.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.\\-]* [0-9] \"" +.\" time-stamp-format: "%:B %:d, %:y" +.\" time-stamp-end: "\"" +.\" time-stamp-line-limit: 20 +.\" end: + |