From: Arthur Shau Date: Wed, 6 Apr 2022 22:45:20 +0000 (-0700) Subject: doc: Add doc files for new ocp plugin commands X-Git-Tag: v2.0~11^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9534c3a026791841fd833c69c16fbcfce30b05f9;p=users%2Fsagi%2Fnvme-cli.git doc: Add doc files for new ocp plugin commands --- diff --git a/Documentation/meson.build b/Documentation/meson.build index c0160073..a12eec4d 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -74,6 +74,8 @@ adoc_sources = [ 'nvme-ns-descs', 'nvme-ns-rescan', 'nvme-nvm-id-ctrl', + 'nvme-ocp-latency-monitor-log', + 'nvme-ocp-smart-add-log', 'nvme-persistent-event-log', 'nvme-pred-lat-event-agg-log', 'nvme-predictable-lat-log', diff --git a/Documentation/nvme-ocp-latency-monitor-log.txt b/Documentation/nvme-ocp-latency-monitor-log.txt new file mode 100644 index 00000000..543bcf98 --- /dev/null +++ b/Documentation/nvme-ocp-latency-monitor-log.txt @@ -0,0 +1,43 @@ +nvme-ocp-latency-monitor-log(1) +=================================== + +NAME +---- +nvme-ocp-latency-monitor-log - Display latency monitor log page data in human readable format + +SYNOPSIS +-------- +[verse] +'nvme ocp latency-monitor-log' [--output-format= -o ] + +DESCRIPTION +----------- + +For the NVMe device given, latency monitor log page data. + +The parameter is mandatory and may be either the NVMe character +device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1). + +This will only work on OCP compliant devices supporting this log page. +Results for any other device are undefined. + +On success it returns 0, error code otherwise. + +OPTIONS +------- +-o :: +--output-format=:: + Set the reporting format to 'normal' or 'json'. Only one output format + can be used at a time. The default is normal. + +EXAMPLES +-------- +* Displays the get latency monitor log for the device: ++ +------------ +# nvme ocp latency-monitor-log /dev/nvme0 +------------ + +NVME +---- +Part of the nvme-user suite. diff --git a/Documentation/nvme-ocp-smart-add-log.txt b/Documentation/nvme-ocp-smart-add-log.txt new file mode 100644 index 00000000..ee54a33e --- /dev/null +++ b/Documentation/nvme-ocp-smart-add-log.txt @@ -0,0 +1,43 @@ +nvme-ocp-smart-add-log(1) +============================ + +NAME +---- +nvme-ocp-smart-add-log - Retrieves Extended SMART information of given OCP compliant device + +SYNOPSIS +-------- +[verse] +'nvme ocp smart-add-log' [--output-format= -o ] + +DESCRIPTION +----------- +For the NVMe device given, send a smart-add-log command and +provide the additional smart log. + +The parameter is mandatory and may be either the NVMe character +device (ex: /dev/nvme0) or 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 +------- +-o :: +--output-format=:: + Set the reporting format to 'normal' or 'json'. Only one output format + can be used at a time. The default is normal. + +EXAMPLES +-------- +* Has the program issue a smart-add-log command to retrieve the 0xC0 log page. ++ +------------ +# nvme ocp smart-add-log /dev/nvme0 +------------ + +NVME +---- +Part of the nvme-user suite. diff --git a/plugins/ocp/ocp-nvme.c b/plugins/ocp/ocp-nvme.c index 598573ee..6b7fc9d4 100644 --- a/plugins/ocp/ocp-nvme.c +++ b/plugins/ocp/ocp-nvme.c @@ -1,18 +1,5 @@ -/* - * Copyright (C) 2022 Meta Platforms, Inc. - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation, either version 3 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . +// SPDX-License-Identifier: GPL-2.0-only +/* Copyright (c) 2022 Meta Platforms, Inc. * * Authors: Arthur Shau , * Wei Zhang , diff --git a/plugins/ocp/ocp-nvme.h b/plugins/ocp/ocp-nvme.h index 6adb7616..19378cdf 100644 --- a/plugins/ocp/ocp-nvme.h +++ b/plugins/ocp/ocp-nvme.h @@ -1,18 +1,5 @@ -/* - * Copyright (C) 2022 Meta Platforms, Inc. - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation, either version 3 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . +/* SPDX-License-Identifier: GPL-2.0-only */ +/* Copyright (c) 2022 Meta Platforms, Inc. * * Authors: Arthur Shau , * Wei Zhang ,