Whamcloud - gitweb
LU-7734 lnet: Update lnetctl usage
authorStephen Champion <schamp@sgi.com>
Fri, 9 Dec 2016 20:31:49 +0000 (12:31 -0800)
committerAmir Shehata <amir.shehata@intel.com>
Wed, 25 Jan 2017 03:10:18 +0000 (19:10 -0800)
Bring lnetctl help descriptions, man page, and usage in line
with changes to peer functions.

Signed-off-by: Stephen Champion <schamp@sgi.com>
Test-Parameters: trivial
Change-Id: Idf115319727d92f23e50a97585f2f2c1e8c1b7b8
Reviewed-on: https://review.whamcloud.com/24279
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
lnet/utils/lnetctl.c
lustre/doc/lnetctl.8

index 1c6c731..2707787 100644 (file)
@@ -144,8 +144,9 @@ command_t peer_cmds[] = {
         "\t--prim_nid: Primary NID of the peer.\n"
         "\t--nid: list of NIDs to remove. If none provided,\n"
         "\t       peer is deleted\n"},
         "\t--prim_nid: Primary NID of the peer.\n"
         "\t--nid: list of NIDs to remove. If none provided,\n"
         "\t       peer is deleted\n"},
-       {"show", jt_show_peer, 0, "show peer credits\n"
-        "\t--nid: NID of peer to filter on.\n"},
+       {"show", jt_show_peer, 0, "show peer information\n"
+        "\t--nid: NID of peer to filter on.\n"
+        "\t--verbose: Include  extended  statistics\n"},
        { 0, 0, 0, NULL }
 };
 
        { 0, 0, 0, NULL }
 };
 
@@ -1202,7 +1203,7 @@ static int jt_show_peer(int argc, char **argv)
        struct cYAML *err_rc = NULL, *show_rc = NULL;
        int detail = 0;
 
        struct cYAML *err_rc = NULL, *show_rc = NULL;
        int detail = 0;
 
-       const char *const short_options = "k:vh";
+       const char *const short_options = "n:vh";
        const struct option long_options[] = {
                { "nid", 1, NULL, 'n' },
                { "verbose", 0, NULL, 'v' },
        const struct option long_options[] = {
                { "nid", 1, NULL, 'n' },
                { "verbose", 0, NULL, 'v' },
@@ -1213,7 +1214,7 @@ static int jt_show_peer(int argc, char **argv)
        while ((opt = getopt_long(argc, argv, short_options,
                                  long_options, NULL)) != -1) {
                switch (opt) {
        while ((opt = getopt_long(argc, argv, short_options,
                                  long_options, NULL)) != -1) {
                switch (opt) {
-               case 'k':
+               case 'n':
                        nid = optarg;
                        break;
                case 'v':
                        nid = optarg;
                        break;
                case 'v':
index 2dba6e2..00e8849 100644 (file)
@@ -102,6 +102,54 @@ parameter\.
 .
 .br
 \-\-verbose: display detailed output per network
 .
 .br
 \-\-verbose: display detailed output per network
+
+.
+.SS "Peer Configuration"
+.TP
+\fBlnetctl peer\fR add
+Configure an LNET peer with at least one supplied NID\.  By default, peers are marked as multi-rail capable\.  If prim_nid is not specified, the first NID in this list is assumed to be the primary NID for the peer.
+.
+.br
+.
+\-\-nid: one or more peer NIDs to add to the peer\.
+.
+.br
+.
+\-\-prim_nid: Primary NID of the peer\.
+.
+.br
+\-\-non_mr: create this peer as not Multi-Rail capable\.
+.
+.br
+
+.TP
+\fBlnetctl peer\fR del
+Delete a peer NID.  The primary NID must be specified.  If the removed NID is the primary NID, the peer entry will be deleted.
+.
+.br
+.
+\-\-nid: one or more peer NIDs to remove from the peer\.
+.
+.br
+.
+\-\-prim_nid: Primary NID of the peer\.
+.
+.br
+
+.TP
+\fBlnetctl peer\fR show
+Show configured peers.  By default, lists all peers and associated NIDs.
+.
+.br
+.
+\-\-nid: list of primary nids to filter on
+.
+.br
+.
+\-\-verbose: Include extended statistics, including credits and counters.
+.
+.br
+
 .
 .SS "Route Configuration"
 .
 .
 .SS "Route Configuration"
 .
@@ -278,33 +326,6 @@ Show LNET statistics
 .br
 
 .
 .br
 
 .
-.SS "Showing Peer Credits"
-.
-.TP
-\fBlnetctl peer_credits\fR
-Show details on configured peer credits
-.
-.br
-\-> Peer nid
-.
-.br
-\-> State
-.
-.br
-\-> Reference count on the peer
-.
-.br
-\-> Maximum transmit credits
-.
-.br
-\-> Available transmit credits
-.
-.br
-\-> Available router credits
-.
-.br
-\-> Minimum router credits\.
-.
 .SH "EXAMPLES"
 .
 .SS "Initializing LNet after load"
 .SH "EXAMPLES"
 .
 .SS "Initializing LNet after load"
@@ -585,10 +606,10 @@ statistics:
 .
 .br
 .
 .
 .br
 .
-.SS "Showing peer credits information"
+.SS "Showing peer information"
 .
 .IP "\(bu" 4
 .
 .IP "\(bu" 4
-lnetctl peer_credits show
+lnetctl peer show
 .
 .IP "" 0
 .
 .
 .IP "" 0
 .
@@ -596,28 +617,40 @@ lnetctl peer_credits show
 peer:
 .
 .br
 peer:
 .
 .br
-       \- nid: 192\.168\.205\.131@tcp1
+    \- primary nid: 10\.148\.0\.8@o2ib
+.
+.br
+      Multi\-Rail: True
+.
+.br
+      peer ni:
+.
+.br
+        \- nid: 10\.148\.0\.8@o2ib
+.
+.br
+          state: NA
 .
 .br
 .
 .br
-         state: down
+    \- primary nid: 10\.148\.0\.20@o2ib
 .
 .br
 .
 .br
-         refcount: 4
+      Multi\-Rail: True
 .
 .br
 .
 .br
-         max_ni_tx_credits: 8
+      peer ni:
 .
 .br
 .
 .br
-         available_tx_credits: 8
+        \- nid: 10\.148\.0\.20@o2ib
 .
 .br
 .
 .br
-         available_rtr_credits: 8
+          state: NA
 .
 .br
 .
 .br
-         min_rtr_credits: 7
+        \- nid: 10\.148\.0\.25@o2ib
 .
 .br
 .
 .br
-         tx_q_num_of_buf: 0
+          state: NA
 .
 .br
 
 .
 .br