p4 logtail
Display the last block(s) of the error log.
Syntax
p4 [g-opts] logtail [-b blocksize] [-s start_offset [-m maxBlocks]] [-l log]
Description
The p4 logtail
command displays the last block(s) of
the error log, and the offset for the next block, when available.
Output consists of a series of lines in tagged format. The first line is
"... file LOG
", followed by multiple blocks of log data. By
default, all blocks from the start_offset
are output
until the end of the file. The data is returned in blocks of size
blocksize
, each of which is tagged with "...
data
". The last line is "...
offset
", where
next_offset
next_offset
is the offset in the logfile from which
the next block of data is to be retrieved.
If you specify the name of an error log that has an associated counter,
the p4 logtail
command returns the current value of
that counter. It also returns the current size of the log, at the end of
the output (along with the ending offset in the log). The size and offset
are the same if the command reads to the end of the log.
Options
|
The block size, in bytes. The default is 8192 bytes. |
|
If specified, the name of the log to display. |
|
The maximum number of blocks to output. Ignored unless
|
|
The offset (from the beginning of the file), in bytes. |
|
See Global options. |
Usage notes
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
N/A |
N/A |
available to an operator user |
See Logging commands in the Helix Core Server Administrator Guide.
Examples
|
Display the last two kilobytes of the log file, as two separate blocks of 1,024 bytes each. |