1NVME-GET-LOG(1)                   NVMe Manual                  NVME-GET-LOG(1)
2
3
4

NAME

6       nvme-get-log - Retrieves a log page from an NVMe device
7

SYNOPSIS

9       nvme get-log <device> [--log-id=<log-id> | -i <log-id>]
10                     [--log-len=<log-len> | -l <log-len>]
11                     [--aen=<aen> | -a <aen>]
12                     [--namespace-id=<nsid> | -n <nsid>]
13                     [--raw-binary | -b]
14                     [--lpo=<offset> | -o <offset>]
15                     [--lsp=<field> | -s <field>]
16                     [--lsi=<field> | -S <field>]
17                     [--rae | -r]
18                     [--csi=<command_set_identifier> | -y <command_set_identifier>]
19                     [--ot=<offset_type> | -O <offset_type>]
20                           [--xfer-len=<length> | -x <length>]
21

DESCRIPTION

23       Retrieves an arbitrary NVMe log page from an NVMe device and provides
24       the returned structure.
25
26       The <device> parameter is mandatory and may be either the NVMe
27       character device (ex: /dev/nvme0), or a namespace block device (ex:
28       /dev/nvme0n1).
29
30       On success, the returned log structure may be returned in one of
31       several ways depending on the option flags; the structure may be
32       displayed in hex by the program or the raw buffer may be printed to
33       stdout for another program to parse.
34

OPTIONS

36       -l <log-len>, --log-len=<log-len>
37           Allocates a buffer of <log-len> bytes size and requests this many
38           bytes be returned in the constructed NVMe command. This param is
39           mandatory.
40
41       -i <log-id>, --log-id=<log-id>
42           Sets the commands requested log-id to <log-id>. Defaults to 0.
43
44       -a <aen>, --aen=<aen>
45           Convenience field for extracting log information based on an
46           asynchronous event notification result. This will override log-id
47           and log-len, if set.
48
49       -n <nsid>, --namespace-id=<nsid>
50           Sets the command’s nsid value to the given nsid. Defaults to
51           0xffffffff if not given. This option may not affect anything
52           depending on the log page, which may or may not be specific to a
53           namespace.
54
55       -b, --raw-binary
56           Print the raw log buffer to stdout.
57
58       -o <offset>, --lpo=<offset>
59           The log page offset specifies the location within a log page to
60           start returning data from. It’s Dword-aligned and 64-bits.
61
62       -s <field>, --lsp=<field>
63           The log specified field of LID.
64
65       -S <field>, --lsi=<field>
66           The log specified field of Log Specific Identifier.
67
68       -r, --rae
69           Retain an Asynchronous Event.
70
71       -y <command_set_identifier>, --csi=<command_set_identifier>
72           This field specifies the identifier of command set. if not issued,
73           NVM Command Set will be selected.
74
75       -O, --ot
76           This field specifies the offset type. If set to false, the Log Page
77           Offset Lower field and the Log Page Offset Upper field specify the
78           byte offset into the log page to be returned. If set to true, the
79           Log Page Offset Lower field and the Log Page Offset Upper field
80           specify the index into the list of data structures in the log page
81           to be returned. The default is byte offset. If the option is
82           specified the index mode is used.
83
84       -x <length>
85           --xfer-len <length>: Specify the read chunk size. The length
86           argument is expected to be a multiple of 4096. The default size is
87           4096.
88

EXAMPLES

90       •   Get 512 bytes from log page 2
91
92               # nvme get-log /dev/nvme0 --log-id=2 --log-len=512
93
94           The above example will get log page 2 (SMART), and request 512
95           bytes. On success, the returned log will be dumped in hex and not
96           interpreted by the program.
97
98       •   Have the program return the raw log page in binary:
99
100               # nvme get-log /dev/nvme0 -log-id=2 --log-len=512 --raw-binary > log_page_2.raw
101               # nvme get-log /dev/nvme0 -i 2 -l 512 -b > log_page_2.raw
102
103           It is not a good idea to not redirect stdout when using this mode.
104

NVME

106       Part of the nvme-user suite
107
108
109
110NVMe                              09/29/2023                   NVME-GET-LOG(1)
Impressum