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]

Syntax conventions

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 "... offsetnext_offset", where 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

-b blocksize

The block size, in bytes. The default is 8192 bytes.

-l log

If specified, the name of the log to display.

-m maxBlocks

The maximum number of blocks to output. Ignored unless -s is also specified.

-s start

The offset (from the beginning of the file), in bytes.

g-opts

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

super

available to an operator user

See Logging commands in the Helix Core Server Administrator Guide.

Examples

p4 logtail -b 1024 -m 2

Display the last two kilobytes of the log file, as two separate blocks of 1,024 bytes each.