'\" t
.\" Title: nvme-sanitize-log
-.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
-.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 10/20/2020
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 04/05/2021
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SANITIZE\-LOG" "1" "10/20/2020" "NVMe" "NVMe Manual"
+.TH "NVME\-SANITIZE\-LOG" "1" "04/05/2021" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.SH "SYNOPSIS"
.sp
.nf
-\fInvme sanitize\-log\fR <device> [\-\-output\-format=<fmt> | \-o <fmt>]
+\fInvme sanitize\-log\fR <device> [\-\-rae | \-r] [\-\-output\-format=<fmt> | \-o <fmt>]
[\-\-human\-readable | \-H]
[\-\-raw\-binary | \-b]
.fi
On success it returns 0, error code otherwise\&.
.SH "OPTIONS"
.PP
+\-r, \-\-rae
+.RS 4
+Retain an Asynchronous Event\&.
+.RE
+.PP
\-o <format>, \-\-output\-format=<format>
.RS 4
Set the reporting format to
<h2 id="_synopsis">SYNOPSIS</h2>\r
<div class="sectionbody">\r
<div class="verseblock">\r
-<pre class="content"><em>nvme sanitize-log</em> <device> [--output-format=<fmt> | -o <fmt>]\r
+<pre class="content"><em>nvme sanitize-log</em> <device> [--rae | -r] [--output-format=<fmt> | -o <fmt>]\r
[--human-readable | -H]\r
[--raw-binary | -b]</pre>\r
<div class="attribution">\r
<div class="sectionbody">\r
<div class="dlist"><dl>\r
<dt class="hdlist1">\r
+-r\r
+</dt>\r
+<dt class="hdlist1">\r
+--rae\r
+</dt>\r
+<dd>\r
+<p>\r
+ Retain an Asynchronous Event.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
-o <format>\r
</dt>\r
<dt class="hdlist1">\r
<div id="footer">\r
<div id="footer-text">\r
Last updated\r
- 2019-11-08 02:18:28 JST\r
+ 2021-04-05 15:38:33 IST\r
</div>\r
</div>\r
</body>\r
SYNOPSIS
--------
[verse]
-'nvme sanitize-log' <device> [--output-format=<fmt> | -o <fmt>]
+'nvme sanitize-log' <device> [--rae | -r] [--output-format=<fmt> | -o <fmt>]
[--human-readable | -H]
[--raw-binary | -b]
OPTIONS
-------
+-r::
+--rae::
+ Retain an Asynchronous Event.
+
-o <format>::
--output-format=<format>::
Set the reporting format to 'normal', 'json', or
return nvme_get_log(fd, 0, NVME_LOG_DISC, false, NVME_NO_LOG_LSP, size, log);
}
-int nvme_sanitize_log(int fd, struct nvme_sanitize_log_page *sanitize_log)
+int nvme_sanitize_log(int fd, bool rae, struct nvme_sanitize_log_page *sanitize_log)
{
- return nvme_get_log(fd, 0, NVME_LOG_SANITIZE, false,
+ return nvme_get_log(fd, 0, NVME_LOG_SANITIZE, rae,
NVME_NO_LOG_LSP, sizeof(*sanitize_log), sanitize_log);
}
int nvme_ana_log(int fd, void *ana_log, size_t ana_log_len, int rgo);
int nvme_effects_log(int fd, struct nvme_effects_log_page *effects_log);
int nvme_discovery_log(int fd, struct nvmf_disc_rsp_page_hdr *log, __u32 size);
-int nvme_sanitize_log(int fd, struct nvme_sanitize_log_page *sanitize_log);
+int nvme_sanitize_log(int fd, bool rae, struct nvme_sanitize_log_page *sanitize_log);
int nvme_predictable_latency_per_nvmset_log(int fd,
__u16 nvmset_id, struct nvme_predlat_per_nvmset_log_page *plpns_log);
int nvme_predictable_latency_event_agg_log(int fd, void *pea_log,
static int sanitize_log(int argc, char **argv, struct command *command, struct plugin *plugin)
{
const char *desc = "Retrieve sanitize log and show it.";
+ const char *rae = "Retain an Asynchronous Event";
const char *raw = "show log in binary format";
const char *human_readable = "show log in readable format";
struct nvme_sanitize_log_page sanitize_log;
int fd, err;
struct config {
+ bool rae;
int raw_binary;
int human_readable;
char *output_format;
};
struct config cfg = {
+ .rae = false,
.output_format = "normal",
};
OPT_ARGS(opts) = {
+ OPT_FLAG("rae", 'r', &cfg.rae, rae),
OPT_FMT("output-format", 'o', &cfg.output_format, output_format),
OPT_FLAG("human-readable",'H', &cfg.human_readable, human_readable),
OPT_FLAG("raw-binary", 'b', &cfg.raw_binary, raw),
if (cfg.human_readable)
flags |= VERBOSE;
- err = nvme_sanitize_log(fd, &sanitize_log);
+ err = nvme_sanitize_log(fd, cfg.rae, &sanitize_log);
if (!err)
nvme_show_sanitize_log(&sanitize_log, devicename, flags);
else if (err > 0)