p4 journals

Display history of checkpoint and journal activity for the server.

Syntax

p4 [g-opts] journals [-F filter] [-T fields] [-m max]

Syntax conventions

Description

The p4 journals command displays information from the db.ckphist table, which holds historical information about checkpoint and journal activity. A server uses this table to record the following checkpoint and journal events:

  • the server takes a checkpoint
  • the server rotates a journal
  • the server replays a journal
  • a replica schedules a checkpoint

Each server in a multi-server installation has its own, unique db.ckphist table that is not replicated to replicas. This table is not part of the main server database, is not journaled, does not need to be backed up, and is not included in checkpoints. If anything goes wrong, it can be thrown away.

Here’s an example of the output from p4 journals.

maria:~ mgonzales$ p4 -p server1:1666 journals
... start 1381278576
... startDate 2013/10/08 17:29:36
... end 1381278576
... endDate 2013/10/08 17:29:36
... pid 19960
... type checkpoint
... flags
... jnum 19
... jfile checkpoint.19
... jdate 1381278576
... jdateDate 2013/10/08 17:29:36
... jdigest E4EB1FF5B589D05E9F5A8EE1F8183A86
... jsize 27183115
... jtype text
... failed 0
... errmsg

... start 1381278576
... startDate 2013/10/08 17:29:36
... end 1381278576
... endDate 2013/10/08 17:29:36
... pid 19960
... type checkpoint
... flags
... jnum 18
... jfile journal.18
... jdate 1381278575
... jdateDate 2013/10/08 17:29:35
... jdigest 00000000000000000000000000000000
... jsize 15737
... jtype text
... failed 1
... errmsg

... start 1374629669
... startDate 2013/07/23 18:34:29
... end 1374629669
... endDate 2013/07/23 18:34:29
... pid 14700
... type replay
... flags -r . -j r
... jnum -1
... jfile basis.ckp
... jdate 1366076427
... jdateDate 2013/04/15 18:40:27
... jdigest 00000000000000000000000000000000
... jsize 27181640
... jtype text
... failed 1
... errmsg
Note

Checkpoints and journals use Unix epoch time. See the Timestamp and Unix epoch time information.

This command displays full error message text for a failed checkpoint.

Use the global -F option to format the output from the p4 journals. For example:

p4 -F "%jfile% %jnum%" journals -F type=checkpoint

The output lists from newest event to oldest event.

Fields in the output of p4 journals

Field Meaning

start

Starting Unix timestamp of the command that ran. See type field to determine which command was executed.

startDate

Human-readable form of start value.

end

Ending Unix timestamp of the command that ran.

endDate

Human-readable form of end value.

pid

The process id of the command whose execution produced this record. This value can be useful in searching for related entries in other logs.

type

Indicates the command whose execution produced this record. Types include the following:

  • journal: refers to the p4 -J command or the p4 admin journal command.
  • checkpoint: refers to the p4 -jc command or p4 admin checkpoint command.
  • checkpoint-parallel-multifile: refers to parallel checkpoint and dump operations. See the jdigest field.

  • replay: refers to the p4d -jr command
  • schedule: refers to taking a checkpoint on a replicated server. This produces two records: one for the checkpoint and another for the schedule.

flags

Flags passed to the command implied by the type filed.

jnum

The checkpoint number. A value of -1 indicates that the journal number is unknown.

jfile

The name of a journal or checkpoint file that was input to the command implied by the type field.

jdate

Unix timestamp when the filed specified by jfile was created.

jdateDate

Human-readable format of jdate value.

jdigest

The digest of the checkpoint file.

For checkpoint-parallel-multifile, the jdigest field is expected to be all zeros. The md5 file generated for a checkpoint-parallel-multifile is an aggregate checksum that contains one line for each checkpoint file. That line contains the name and the md5 sum for that file. To learn more, see Parallel checkpointing, dumping and recovery in the Helix Core Server Administrator Guide.

jsize

The size of the file specified by jfile.

jtype

The type of the file specified by jtype.

Options

-F filter

List only the records that satisfy the filter expression. For instructions on constructing the filter expression, see Job Views.

-m max

Limit output to the specified number of records.

-T fields

Limit output to the specified fields. Separate fields using a comma or a space.

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

Related commands

To create a checkpoint.

p4 admin checkpoint

To create a journal.

p4 admin journal