summaryrefslogtreecommitdiffstats
path: root/Documentation/nvme-ocp-internal-log.txt
blob: 73933491227be8bfbbe67480555d4d1e719a49c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
nvme-ocp-internal-log(1)
========================

NAME
----
nvme-ocp-internal-log - Conditionally retrieves 07h Telemetry Host-Initiated
log, C9h OCP Strings Log from an NVMe device or from user-specified file path.
Takes retrieved logs and decodes into human-readable output format specified by
user.

SYNOPSIS
--------
[verse]
'nvme ocp internal-log' <device>
			[--telemetry-log=<file> | -l <file>]
			[--string-log=<file> | -s <file>]
			[--output-file=<file> | -o <file>]
			[--output-format=<fmt> | -f <fmt>]
			[--data-area=<da> | -a <da>]
			[--telemetry-type=<type> | -t <type>]

DESCRIPTION
-----------
Conditionally retrieves 07h Telemetry Host-Initiated log, C9h OCP Strings Log
from an NVMe device or from user-specified file path. Takes retrieved logs and
decodes (or) parses into human-readable output format specified by user.

The <device> parameter is mandatory and may be either the NVMe
character device (ex: /dev/nvme0), or a namespace block device (ex:
/dev/nvme0n1).

This will only work on OCP compliant devices supporting this feature.
Results for any other device are undefined.

On success it returns 0, error code otherwise.

OPTIONS
-------
-l <file>::
--telemetry-log=<file>::
	File name to existing Telemetry Host-Initiated raw binary data to be used.
	If no path is specified, a live retrieval of payload on <device> will be
	performed.

-s <file>::
--string-log=<file>::
	File name to existing OCP String Log raw binary data to be used. If no path
	is specified, a live retrieval of payload on <device> will be
	performed.

-o <file>::
--output-file=<file>::
	Filepath name to where human-readable output data will be saved to.

-f <fmt>::
--output-format=<fmt>::
	Set the reporting format to 'normal', 'json'. Only one output format can be
	used at a time, the default value is 'json'.

-a <da>::
--data-area=<da>::
	Retrieves the specific data area requested. Valid inputs are 1,2. If this
	option is not specified, the default value is 1.

-t <type>::
--telemetry-type=<type>::
	If set to 1, controller shall capture the Telemetry Host-Initiated data
	representing the internal state of the controller at the time the associated
	Get Log Page command is processed. If cleared to 0, controller shall not
	update this data.

EXAMPLES
--------

* Retrieve in both OCP String Log and Telemetry Host-Initiated Log from
device. Decode default data-area(s) in default format and output to console.
+
----------------------------------
# nvme ocp internal-log /dev/nvme0
----------------------------------

* Retrieve Telemetry Host-Initiated data, reads in the OCP String Log locally.
Decode default data-area(s) in default format.
+
--------------------------------------------------------------------
# nvme ocp internal-log /dev/nvme0 --string-log=ocp_string_log.bin
 --output-file=output_file.json
--------------------------------------------------------------------

* Retrieve OCP String Log, reads in the Telemetry Host-Initiated Log locally.
Decode data-areas 1 and 2, and output in json format.
+
---------------------------------------------------------------------
# nvme ocp internal-log /dev/nvme0 --telemetry-log=host_telemetry.bin
 --output-format=json --output-file=output_file.json --data-area=2
---------------------------------------------------------------------

* Reads in both OCP String Log and Telemetry Host-Initiated Log locally.
Decode data-areas 1 and 2, and output in normal text format.
+
------------------------------------------------------------------
# nvme ocp internal-log /dev/nvme0 --string-log=ocp_string_log.bin
 --telemetry-log=host_telemetry.bin --output-format=normal
 --output-file=output_file.txt --data-area=2
------------------------------------------------------------------

NVME
----
Part of the nvme-user suite