From patchwork Thu Sep 13 08:18:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eran Ben Elisha X-Patchwork-Id: 969288 X-Patchwork-Delegate: dsahern@gmail.com Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 429s4Y4LH4z9s4V for ; Thu, 13 Sep 2018 18:19:09 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727735AbeIMN1b (ORCPT ); Thu, 13 Sep 2018 09:27:31 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:35688 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726308AbeIMN1a (ORCPT ); Thu, 13 Sep 2018 09:27:30 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eranbe@mellanox.com) with ESMTPS (AES256-SHA encrypted); 13 Sep 2018 11:23:16 +0300 Received: from dev-l-vrt-199-005.mtl.labs.mlnx (dev-l-vrt-199-005.mtl.labs.mlnx [10.134.199.5]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w8D8ItHZ029293; Thu, 13 Sep 2018 11:19:00 +0300 From: Eran Ben Elisha To: netdev@vger.kernel.org, Jiri Pirko , Andy Gospodarek , Michael Chan , Jakub Kicinski , Simon Horman , Alexander Duyck Cc: Andrew Lunn , Florian Fainelli , Tal Alon , Ariel Almog , Eran Ben Elisha Subject: [RFC PATCH iproute2-next] man: Add devlink health man page Date: Thu, 13 Sep 2018 11:18:16 +0300 Message-Id: <1536826696-9413-2-git-send-email-eranbe@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1536826696-9413-1-git-send-email-eranbe@mellanox.com> References: <1536826696-9413-1-git-send-email-eranbe@mellanox.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add devlink-health man page. Devlink-health tool will control device health attributes, sensors, actions and logging. Signed-off-by: Eran Ben Elisha ------------------------------------------------------- Copy paste man output to here for easier review process of the RFC. DEVLINK-HEALTH(8) Linux DEVLINK-HEALTH(8) NAME devlink-health - devlink health configuration SYNOPSIS devlink [ OPTIONS ] health { COMMAND | help } OPTIONS := { -V[ersion] | -n[no-nice-names] } devlink health show [ DEV ] [ sensor NAME ] devlink health sensor set DEV name NAME [ action NAME { active | inactive } ]" devlink health action set DEV name NAME period PERIOD count COUNT fail { ignore | down } devlink health action reinit DEV name NAME devlink health help DESCRIPTION devlink-health tool allows user to configure the way driver treats unexpected status. The tool allows configuration of the sensors that can trigger health activity. Set for each sensor the follow up operations, such as, reset and dump of info. In addition, set the health activity termination action. devlink health show - Display devlink health sensors and actions attributes DEV - Specifies the devlink device to show. If this argument is omitted, all devices are listed. Format is: BUS_NAME/BUS_ADDRESS sensor NAME - Specifies the devlink sensor to show. devlink health sensor set - sets devlink health sensor attributes DEV Specifies the devlink device to show. name NAME Name of the sensor to set. action NAME { active | inactive } Specify which actions to activate and which to deactivate once a sensor was triggered. actions can be dump, reset, etc. devlink health action set - sets devlink action attributes DEV Specifies the devlink device to set. name NAME Specifies the devlink action to set. period PERIOD The period on which we limit the amount of performed actions, measured in seconds. count COUNT The maximum amount of actions performed in a limit time frame. fail { ignore | down } Specify the behavior once count limit was reached. ignore - Ignore errors without execution of any action. down - Driver will remain in nonoperational state. devlink health action reinit - reset devlink action attributes (period, count, fail, etc) DEV Specifies the devlink device to set. name NAME Specifies the devlink action to set. EXAMPLES devlink health show Shows the health state of all devlink devices on the system. devlink health show pci/0000:01:00.0 Shows the health state of specified devlink device. devlink health sensor set pci/0000:01:00.0 name TX_COMP_ERROR action reset off action dump on Sets TX_COMP_ERROR sensor parameters for a specific device. devlink health action set pci/0000:01:00.0 name reset period 3600 count 5 fail ignore Sets health attributes for reset action. SEE ALSO devlink(8), devlink-port(8), devlink-sb(8), devlink-monitor(8), devlink-dev(8), AUTHOR Eran ben Elisha iproute2 15 Aug 2018 DEVLINK-HEALTH(8) --- man/man8/devlink-health.8 | 171 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 man/man8/devlink-health.8 diff --git a/man/man8/devlink-health.8 b/man/man8/devlink-health.8 new file mode 100644 index 000000000000..ac28b020be0d --- /dev/null +++ b/man/man8/devlink-health.8 @@ -0,0 +1,171 @@ +.TH DEVLINK\-HEALTH 8 "15 Aug 2018" "iproute2" "Linux" +.SH NAME +devlink-health \- devlink health configuration +.SH SYNOPSIS +.sp +.ad l +.in +8 +.ti -8 +.B devlink +.RI "[ " OPTIONS " ]" +.BR health +.RI " { " COMMAND " | " +.BR help " }" +.sp + +.ti -8 +.IR OPTIONS " := { " +\fB\-V\fR[\fIersion\fR] | +\fB\-n\fR[\fIno-nice-names\fR] } + +.ti -8 +.B devlink health show +.RI "[ " DEV " ]" +.RI "[ " +.B sensor +.IR NAME +.RI "]" + +.ti -8 +.B devlink health sensor set +.IR DEV +.B name +.IR NAME +.RI "[ " +.BR action +.IR NAME +.R "{" active "|" inactive "}" ]" + +.ti -8 +.B devlink health action set +.IR DEV +.B name +.IR NAME +.BR period +.IR PERIOD +.BR count +.IR COUNT +.BR fail " { " +.IR ignore +.BR "| " +.IR down +.R "} " + +.ti -8 +.B devlink health action reinit +.IR DEV +.B name +.IR NAME + +.ti -8 +.B devlink health help + +.SH "DESCRIPTION" +.B devlink-health +tool allows user to configure the way driver treats unexpected status. The tool allows configuration of the sensors that can trigger health activity. Set for each sensor the follow up operations, such as, reset and dump of info. In addition, set the health activity termination action. + +.SS devlink health show - Display devlink health sensors and actions attributes +.PP +.B "DEV" +- Specifies the devlink device to show. +If this argument is omitted, all devices are listed. + +.in +4 +Format is: +.in +2 +BUS_NAME/BUS_ADDRESS + +.PP +.BR sensor +.IR "NAME" +- Specifies the devlink sensor to show. + +.SS devlink health sensor set - sets devlink health sensor attributes + +.TP +.B "DEV" +Specifies the devlink device to show. + +.TP +.BI name " NAME" +Name of the sensor to set. + +.TP +.BR action +.IR NAME +.R "{" active "|" inactive "} " +.in +4 +Specify which actions to activate and which to deactivate once a sensor was triggered. actions can be dump, reset, etc. + +.SS devlink health action set - sets devlink action attributes + +.TP +.B "DEV" +Specifies the devlink device to set. + +.TP +.BI name " NAME" +Specifies the devlink action to set. + +.TP +.BI period " PERIOD" +The period on which we limit the amount of performed actions, measured in seconds. + +.TP +.BI count " COUNT" +The maximum amount of actions performed in a limit time frame. + +.TP +.BR fail +.R "{" ignore "|" down "}" +.in +4 +Specify the behavior once count limit was reached. + +.I ignore +- Ignore errors without execution of any action. + +.I down +- Driver will remain in nonoperational state. + +.SS devlink health action reinit - reset devlink action attributes (period, count, fail, etc) + +.TP +.B "DEV" +Specifies the devlink device to set. + +.TP +.BI name " NAME" +Specifies the devlink action to set. + +.SH "EXAMPLES" +.PP +devlink health show +.RS 4 +Shows the health state of all devlink devices on the system. +.RE +.PP +devlink health show pci/0000:01:00.0 +.RS 4 +Shows the health state of specified devlink device. +.RE +.PP +devlink health sensor set pci/0000:01:00.0 name TX_COMP_ERROR action reset off action dump on +.RS 4 +Sets TX_COMP_ERROR sensor parameters for a specific device. +.RE +.PP +devlink health action set pci/0000:01:00.0 name reset period 3600 count 5 fail ignore +.RS 4 +Sets health attributes for reset action. +.RE + +.SH SEE ALSO +.BR devlink (8), +.BR devlink-port (8), +.BR devlink-sb (8), +.BR devlink-monitor (8), +.BR devlink-dev (8), +.br + +.SH AUTHOR +Eran ben Elisha