SYNOPSIS
nvme [<global-options>] ocp persistent-event-log <device>
[--action=<action> | -a <action>]
[--log-len=<log-len> | -l <log-len>]
[--raw-binary | -b]
DESCRIPTION
Retrieves the NVMe persistent event log page from an NVMe device and provides the returned structure.
The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).
On success, the returned persistent event log structure may be returned in one of several ways depending on the option flags; the structure may parsed by the program and printed in a readable format or the raw buffer may be printed to stdout for another program to parse.
OPTIONS
- -a <action>
- --action=<action>
-
The action the controller takes with the reporting context of the log. 0 (Read Log Data) reads the log of an established context. 1 (Establish Context and Read Log Data) establishes a context, and fails if one is established. 2 (Release Context) releases the context. 3 (Establish Context and Read 512 Bytes of Header) establishes a context unless one is established, and reads only the log header. Defaults to 3. A context stays established until it is released with action 2. Action 3 requires ECRH support. For more details see the NVM Express Base Specification, Revision 2.1, section 5.1.12.1.14 Persistent Event (Log Page Identifier 0Dh).
- -l <log-len>
- --log-len=<log-len>
-
The number of bytes of the log to read. Without it, or with 0, action 0 reads the Total Log Length (TLL) of the log, and action 1 only establishes the context. Actions 2 and 3 ignore it.
- -b
- --raw-binary
-
Print the raw persistent event log buffer to stdout.
GLOBAL OPTIONS
The following options are defined at the top-level nvme command
and are available to this subcommand:
- --dry-run
-
Print the command that would be executed, but do not actually execute it.
- --no-ioctl-probing
-
Disable probing for 64-bit IOCTL support.
- --no-retries
-
Disable retry logic on transient errors.
- -o <fmt>
- --output-format=<fmt>
-
Set the reporting format to normal, tabular, 'json, or binary. Only one output format may be used at a time.
- --output-format-version=<version>
-
Select the output format version. Version 1 uses the original field naming, while version 2 (default) provides more consistent and script-friendly field names. Other versions are rejected.
- --quiet
-
Suppress informational messages. Errors are still reported, and --quiet cancels any --verbose for the library log level.
- --set-options=<key=value>[,<key=value>…]
-
Set libnvme library options for this invocation. Supported keys are force-4k, mi-probe-enabled, test-base-dir and test-sysfs-dir.
- --timeout=<ms>
-
Set the timeout for the command in milliseconds. infinite or -1 waits without a time limit (0xffffffff).
- -v
- --verbose
-
Increase the level of detail in the output. May be specified multiple times to further increase verbosity.
These options can also be set as machine-wide defaults in nvme-cli.conf(5). A command-line flag always overrides the file.
EXAMPLES
-
Establish a reporting context if needed and print the log header:
# nvme ocp persistent-event-log /dev/nvme0NoteA context must be released using --action=2 before --action=1 can be used. -
Establish a reporting context (assumes no existing context), print the persistent event log page of the context in a human readable format, and release the context:
# nvme ocp persistent-event-log /dev/nvme0 --action=1 # nvme ocp persistent-event-log /dev/nvme0 --action=0 # nvme ocp persistent-event-log /dev/nvme0 --action=2 -
Print the raw persistent event log of an established context to a file:
# nvme ocp persistent-event-log /dev/nvme0 --action=0 --raw-binary > persistent_log.rawIt is probably a bad idea to not redirect stdout when using this mode.
NVME
Part of the nvme-user suite