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

DESCRIPTION

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

OPTIONS

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

EXAMPLES

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

NVME

100       Part of the nvme-user suite
101
102
103
104NVMe                              04/11/2022                   NVME-GET-LOG(1)
Impressum