1LOGTAIL(8)                      logtail2 manual                     LOGTAIL(8)
2
3
4

NAME

6       logtail2 - print log file lines that have not been read
7

SYNOPSIS

9       logtail2 [-t] -flogfile [-ooffsetfile]
10

DESCRIPTION

12       logtail2  reads a specified file (usually a log file) and writes to the
13       standard output that part of it which has not  been  read  by  previous
14       runs  of  logtail2.  It prints the appropriate number of bytes from the
15       end of logfile, assuming that all changes that are made to  it  are  to
16       add new characters to it.
17
18       logfile must be a plain file.  A symlink is not allowed.
19
20       logtail2  stores  the information about how much of it has already been
21       read in a separate file called offsetfile.  offsetfile can be  omitted.
22       If  omitted,  the file named logfile.offset in the same directory which
23       contains logfile is used by default.
24
25       If offsetfile is not empty, the inode of logfile is  checked.   If  the
26       inode   is   changed,   logtail2   uses   the   heuristics   stored  in
27       /usr/share/logtail/detectrotate/ to find  a  file  that  might  be  the
28       rotated  logfile and prints it starting with the stored offset. It then
29       proceeds to simply print the entire new file and generates a  new  off‐
30       setfile.   If  the  inode is not changed but logfile is shorter than it
31       was at the last run of logtail2, it writes a  warning  message  to  the
32       standard output.
33

OPTIONS

35       -f     logfile to be read after offset
36
37       -o     offsetfile stores offset of previous run
38
39       -t     test mode - do not change offset in offsetfile
40

RETURN VALUES

42       0      successful
43
44       65     cannot get the size of logfile
45
46       66     general file or directory access issue
47
48       73     cannot write offsetfile
49

AUTHOR

51       The  original  logtail  was  written  in  C  by Craig H. Rowland <crow‐
52       land@psionic.com>.  This version of logtail is a modification  of  Paul
53       Slootman's  re-implementation in perl.  enhanced by the Debian Logcheck
54       Team <logcheck-devel@lists.alioth.debian.org>.
55
56       This manual was written by Oohara Yuuma <oohara@libra.interq.or.jp> and
57       enhanced        by        the        Debian        Logcheck        Team
58       <logcheck-devel@lists.alioth.debian.org>..
59

SEE ALSO

61       logcheck(8)
62
63
64
65Debian                            28 Jul 2007                       LOGTAIL(8)
Impressum