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                             [--rae | -r]
17

DESCRIPTION

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

OPTIONS

32       -l <log-len>, --log-len=<log-len>
33           Allocates a buffer of <log-len> bytes size and requests this many
34           bytes be returned in the constructed NVMe command. This param is
35           mandatory.
36
37       -i <log-id>, --log-id=<log-id>
38           Sets the commands requested log-id to <log-id>. Defaults to 0.
39
40       -a <aen>, --aen=<aen>
41           Convenience field for extracting log information based on an
42           asynchronous event notification result. This will override log-id
43           and log-len, if set.
44
45       -n <nsid>, --namespace-id=<nsid>
46           Sets the command’s nsid value to the given nsid. Defaults to
47           0xffffffff if not given. This option may not affect anything
48           depending on the log page, which may or may not be specific to a
49           namespace.
50
51       -b, --raw-binary
52           Print the raw log buffer to stdout.
53
54       -o <offset>, --lpo=<offset>
55           The log page offset specifies the location within a log page to
56           start returning data from. It’s Dword-aligned and 64-bits.
57
58       -s <field>, --lsp=<field>
59           The log specified field of LID.
60
61       -r, --rae
62           Retain an Asynchronous Event.
63

EXAMPLES

65       ·   Get 512 bytes from log page 2
66
67               # nvme get-log /dev/nvme0 --log-id=2 --log-len=512
68
69           The above example will get log page 2 (SMART), and request 512
70           bytes. On success, the returned log will be dumped in hex and not
71           interpreted by the program.
72
73       ·   Have the program return the raw log page in binary:
74
75               # nvme get-log /dev/nvme0 -log-id=2 --log-len=512 --raw-binary > log_page_2.raw
76               # nvme get-log /dev/nvme0 -i 2 -l 512 -b > log_page_2.raw
77
78           It is not a good idea to not redirect stdout when using this mode.
79

NVME

81       Part of the nvme-user suite
82
83
84
85NVMe                              01/08/2019                   NVME-GET-LOG(1)
Impressum