Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ADDTS(1)			 User Commands			      ADDTS(1)

NAME
       addts - add timestamps at the beginning of each line

SYNOPSIS
       addts [-asu] [-f	FMT] [-w CHR] [FILE]

       addts -?

DESCRIPTION
       Reads  standard	input and writes it to standard	output,	adding a time-
       stamp at	the begginning (or end)	of each	 line.	If  FILE  is  suppied,
       writes to it instead. Typical usage is for Apache forensic log:

       ForensicLog "|/usr/bin/addts -a /var/log/httpd/forensic.log"

       To  add	timestamps  to the end of each line, formatting	it as an addi-
       tional header:

       ForensicLog "|/usr/bin/addts -a -s -f '|X-TS:%c'	/var/log/httpd/forensic.log"

OPTIONS
       -a     Append to	FILE. Without this option,  FILE  is  truncated	 after
	      opening.

       -f FMT Define  timestamp	 format.  FMT  is a strftime(3)	format string,
	      with an additional format	conversion specifier %@, which is  re-
	      placed with micronseconds.

	      See also -w, below.

       -s     Add timestamp to the end of each line (suffix mode).

       -u     Report times in UTC.

       -w CHR Replace  each  occurrense	of character CHR in format string with
	      single whitespace. Use this option if your Apache	version	is un-
	      able  to	correctly  process quoted arguments in the ForensicLog
	      statement.  Example usage	(newlines added	for readability):

	      ForensicLog "|/usr/bin/addts -w_ -f %Y-%m-%d_%H:%M:%S.%@:_ \
			    -a /var/log/httpd/forensic.log"

BUGS
       Formatted timestamp cannot be longer than 511 bytes.

       Empty lines are left unchanged (no timestamp added).

SEE ALSO
       strftime(3).

AUTHORS
       Sergey Poznyakoff <gray@gnu.org.ua>.

COPYRIGHT
       Copyright (C) 2018, 2019	Sergey Poznyakoff
       License GPLv3+: GNU GPL version 3 or later <http://gnu.org/li-
       censes/gpl.html>
       This  is	 free  software:  you  are free	to change and redistribute it.
       There is	NO WARRANTY, to	the extent permitted by	law.

ADDTS				 July 31, 2019			      ADDTS(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | BUGS | SEE ALSO | AUTHORS | COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=addts&sektion=1&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help