1 .\" SPDX-License-Identifier: GPL-2.0
3 .TH lnetctl 8 "2017 Jan 12" Lustre "configuration utilities"
9 .B lnetctl --list-commands
11 \fBlnetctl\fR \fB<cmd> <subcmd> [optional parameters]\fR
15 \fBlnetctl\fR is used to configure LNet parameters allowing various configuration
16 and debugging features to be accessed\.
19 \fBlnetctl\fR can be invoked in interactive mode by issuing lnetctl command\.
20 After that, commands are issued as below\.
23 To get a complete listing of available commands, type
25 at the lnetctl prompt\. To get basic help on the meaning and syntax of a command
26 type \fB<command>\fR \-\-help\.
29 For non\-interactive use the \fBlnetctl\fR utility can be invoked from the
30 command line as follows:
33 lnetctl \fIcommand\fR \fIsubcommand\fR [optional parameters]
35 .SS "LNet Initialization:"
38 \fBlnetctl lnet\fR configure [\-\-all]
39 Brings up the LNet Network Interface (NI) system\. If the \-\-all option is
40 provided it will load network interfaces defined in the modprobe files\.
41 Otherwise, it doesn\'t initialize any networks by default\.
44 \fBlnetctl lnet\fR unconfigure
45 Brings down the LNet Network Interface (NI) system including any configured
48 .SS "Network Configuration"
52 Configures a network interface either given the network name and physical
53 interface device name, or given the ip2net parameter\. Other parameters
57 \-\-net: net name (e.g. tcp0)
60 \-\-if: physical interface (e.g. eth0)
63 \-\-nid: LNet network address to bring up. Cannot be combined with \-\-net.
66 \-\-ip2net: specify networks based on IP address patterns
69 \-\-peer\-timeout: time to wait before declaring a peer dead (in seconds).
70 Default value for o2iblnd and socklnd is 180 seconds.
73 \-\-peer\-credits: define the max number of in\-flight messages per peer.
76 \-\-peer\-buffer\-credits: the max number of routed in\-flight messages
80 \-\-credits: The total number of in\-flight messages over a network interface.
83 \-\-cpt: The CPU partitions on which the created network interface is bound to.
84 Refer to the Lustre Manual Section "Binding Network Interface Against CPU
85 Partitions" for more details. For example to bind a Network Interface to
86 CPU partitions 0 and 1, you would specify this parameter as \-\-cpt [0,
94 Delete a network interface given the network name\.
97 \-\-net: net name (e.g. tcp0)
100 \-\-nid: lnet network address to bring up. Cannot be combined with \-\-net.
105 \fBlnetctl net\fR show
106 Show all currently configured network interfaces if no parameters given or filter
107 on the network name\. More details can be shown by specifying the \-\-verbose
111 \-\-net: net name (e.g. tcp0) to filter on
114 \-\-verbose: display detailed output per network
117 .SS "Peer Configuration"
119 \fBlnetctl peer\fR add
120 Configure an LNET peer with at least one supplied NID\. The primary NID must be specified. By default, peers are marked as multi-rail capable\.
124 \-\-nid: one or more peer NIDs to add to the peer\.
128 \-\-prim_nid: Primary NID of the peer\.
131 \-\-non_mr: create this peer as not Multi-Rail capable\.
134 \-\-lock_prim: lock primary NID of the peer for the purpose of identification with Lustre\.
139 \fBlnetctl peer\fR del
140 Delete a peer NID. The primary NID must be specified. If the removed NID is the primary NID, the peer entry will be deleted.
144 \-\-nid: one or more peer NIDs to remove from the peer\.
148 \-\-prim_nid: Primary NID of the peer\.
151 \-\-force: optional, use to delete a peer with primary NID locked\.
156 \fBlnetctl peer\fR show
157 Show configured peers. By default, lists all peers and associated NIDs.
161 \-\-nid: list of primary nids to filter on
165 \-\-verbose: Include extended statistics, including credits and counters.
170 .SS "Route Configuration"
173 \fBlnetctl route\fR add
177 \-\-net: net name (e.g. tcp0)
180 \-\-gateway: gateway nid (e.g. 10\.1\.1\.2@tcp)
183 \-\-hop: number to final destination (1 < hops < 255)
186 \-\-priority: priority of route (0 \- highest prio)
192 \fBlnetctl route\fR del
193 Delete a route specified via the network and gateway\.
196 \-\-net: net name (e.g. tcp0)
199 \-\-gateway: gateway nid (e.g. 10\.1\.1\.2@tcp)
205 \fBlnetctl route\fR show
206 Show all currently configured routes if no parameters given, or filter on
207 given parameters\. More details can be shown by specifying the \-\-verbose
211 \-\-net: net name (e.g. tcp0) to filter on
214 \-\-gateway: gateway nid (e.g. 10\.1\.1\.2@tcp) to filter on
217 \-\-hop: number to final destination (1 < hops < 255) to filter on
220 \-\-priority: priority of route (0 \- highest prio to filter on)
223 \-\-verbose: display detailed output per route
228 .SS "Routing Information"
231 \fBlnetctl routing\fR show
232 Show router buffers values as well as show the status of routing (IE: whether
233 the node is set to be a router)
236 Individual values can be set using the \fBlnetctl set\fR command\.
239 \fBlnetctl set\fR tiny_buffers \fIvalue\fR
240 Set the number of tiny buffers in the system\. This is the total number of tiny
241 buffers for all CPU partitions\.
244 \fBlnetctl set\fR small_buffers \fIvalue\fR
245 Set the number of small buffers in the system\. This is the total number of
246 small buffers for all CPU partitions\.
249 \fBlnetctl set\fR large_buffers \fIvalue\fR
250 Set the number of large buffers in the system\. This is the total number of
251 large buffers for all CPU partitions\.
254 \fBlnetctl set\fR routing \fI[0, 1]\fR
255 0 value indicates to disable routing\. 1 value indicates to enable routing\.
256 When routing is disabled the values of the buffers that might have been changed
257 are not remembered, and the next time routing is enabled the default buffer
261 \fBlnetctl set\fR drop_asym_route \fI[0, 1]\fR
262 0 value indicates to accept asymmetrical route messages\. 1 value indicates to
263 drop them\. Asymmetrical route is when a message from a remote peer is coming
264 through a router that would not be used by this node to reach the remote peer\.
267 \fBlnetctl set\fR response_tracking \fI[0, 1, 2, 3]\fR
268 Set the behavior of response tracking\.
269 0 - Only LNet pings and discovery pushes utilize response tracking\.
270 1 - GETs are eligible for response tracking\.
271 2 - PUTs are eligible for response tracking\.
272 3 - Both PUTs and GETs are eligible for response tracking (default)\.
273 Note: Regardless of the value of the response_tracking parameter LNet
274 pings and discovery pushes always utilize response tracking\.
277 \fBlnetctl set\fR recovery_limit \fIvalue\fR
278 Set how long LNet will attempt to recover unhealthy peer interfaces\.
279 0 - Recover indefinitely (default)\.
280 >0 - Recover for the specified number of seconds\.
283 \fBlnetctl set\fR max_recovery_ping_interval \fIvalue\fR
284 Set the maximum recovery ping interval.
285 The recovery ping mechanism increases the next scheduled recovery ping attempt
286 timeout exponentially (base 2) until it is equal to the value set.
287 The default value is 900.
289 .SS "Import and Export YAML Configuration Files"
290 LNet configuration can be represented in YAML format\. A YAML configuration
291 file can be passed to the lnetctl utility via the \fBimport\fR command\. The
292 lnetctl utility will attempt to configure all elements defined in the YAML
296 Similarly the \fBexport\fR command can be used to dump all supported LNet
297 configuration to stdout\. The output can be redirected to a file\.
300 \fBlnetctl import\fR \fIFILE\fR:
304 \fBlnetctl import\fR < \fIFILE\fR
305 \fBimport\fR command uses the specified YAML configuration file to configure
306 LNet parameters defined within\. The import command by default adds the LNet
307 parameters defined in the YAML file, but this default behavior can be
308 overwritten by specifying the desired behavior\.
311 \-\-add: add configuration
314 \-\-del: delete configuration
317 \-\-show: show configuration
320 \-\-exec: execute command
323 \-\-help: display this help
326 \fBlnetctl export\fR \fIFILE\fR:
330 \fBlnetctl export\fR > \fIFILE\fR
331 \fBexport\fR command dumps the LNet configuration, state information, and stats
332 in YAML format to stdout, which can be redirected to a normal file\. The output
333 of the \fBexport\fR command can be used as input to the \fBimport\fR command\.
336 \-\-backup: dump only elements necessary to recreate the current configuration.
339 \-\-help: display this help
341 .SS "LNet Statistics"
344 \fBlnetctl stats\fR show
348 \-> Number of messages allocated
351 \-> Maximum number of messages allocated
354 \-> Number of errors encountered
357 \-> Number of messages sent
360 \-> Number of messages received
363 \-> Number of messages routed
366 \-> Total size in bytes of messages sent
369 \-> Total size in bytes of messages received
372 \-> Total size in bytes of messages routed
375 \-> Total size in bytes of messages dropped
380 .SS "Showing Peer Credits"
383 \fBlnetctl peer_credits\fR
384 Show details on configured peer credits
393 \-> Reference count on the peer
396 \-> Maximum transmit credits
399 \-> Available transmit credits
402 \-> Available router credits
405 \-> Minimum router credits\.
407 .SS "UDSP Configuration"
410 \fBlnetctl udsp\fR add
411 Add user-defined selection policy.
416 Adding a local network udsp.
419 If multiple local networks are available, each one can be assigned a priority\.
420 The one with the highest priority is selected to send on\.
421 NID and network matching is using NID-range syntax, please see the manual for more detail\.
424 \-\-src : network in NID-range syntax (e.g. tcp0 or tcp[1-3])
427 \-\-<priority> <priority value>: optional priority value in [0-255], 0 as the highest
430 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
435 Adding a local NID udsp.
438 Assign priority to local NIDs\. After a local network is chosen, the NI with highest priority is selected\.
441 \-\-src: NID in NID-range syntax (e.g. 10.1.1.2@tcp or 10.1.1.*@tcp)
444 \-\-<priority> <priority value>: optional priority value in [0-255], 0 as the highest
447 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
452 Adding a peer NID udsp.
455 Assign priority to peer NIDs. Peer NID with highest priority is selected to send to\.
458 \-\-dst: NID in NID-range syntax (e.g. 10.1.1.2@tcp)
461 \-\-<priority> <priority value>: optional priority value in [0-255], 0 as the highest
464 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
469 Adding a NID pair udsp.
472 The local NIDs which match the rule are added on a list on the peer NIs matching the rule\.
473 When selecting the peer NI, the one with the local NID being used on its list is preferred\.
476 \-\-dst: NID in NID-range syntax (e.g. 10.1.1.1@tcp)
479 \-\-src: NID in NID-range syntax (e.g. 10.1.1.2@tcp)
482 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
487 Adding a Peer Router udsp.
490 The router NIDs matching the rule are added on a list on the peer NIs matching the rule\.
491 When sending to a remote peer, the router which has its nid on the peer NI list is preferred\.
494 \-\-dst: peer NID in NID-range syntax (e.g. 10.1.1.1@tcp)
497 \-\-rte: router NID in NID-range syntax (e.g. 10.1.2.1@tcp)
500 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
505 \fBlnetctl udsp\fR del
506 Delete user-defined selection policy.
509 \-\-idx: The index of the rule to delete\.
513 \fBlnetctl udsp\fR show
514 Show all user-defined selection policies in the system\. The policies are dumped in YAML form\.
519 \fBlnetctl debug\fR recovery
520 List NIDs on recovery queue
523 \-\-local : list NIDs on local recovery queue
526 \-\-peer : list NIDs on peer recovery queue
531 \fBlnetctl debug\fR peer
532 Dump peer debug info to debug log and console
542 Output a list of the commands supported by the lnetctl utility
545 .SS "Initializing LNet after load"
548 lnetctl lnet configure
551 lnetctl lnet configure \-\-all
555 .SS "Shutting down LNet"
558 lnetctl lnet unconfigure
565 lnetctl net add \-\-net tcp0 \-\-if eth0
568 lnetctl net add \-\-ip2net "tcp0(eth0) 192\.168\.0\.[2,4]; tcp0 192\.168\.0\.*;
569 o2ib0 132\.6\.[1\-3]\.[2\-8/2]"
576 lnetctl net del \-\-net tcp0
583 lnetctl net show \-\-verbose:
605 peer_buffer_credits: 0
611 \- nid: 192\.168\.205\.130@tcp1
635 peer_buffer_credits: 0
645 lnetctl route add \-\-net tcp0 \-\-gateway 10\.10\.10\.1@tcp1 \-\-hop 1
653 lnetctl route del \-\-net tcp0 \-\-gateway 10\.10\.10\.1@tcp1
660 lnetctl route show \-\-verbose
671 gateway: 192\.168\.205\.131@tcp1
677 priority: 0 state: down
742 .SS "Setting variables"
745 lnetctl set tiny_buffers 2048
748 lnetctl set small_buffers 16384
751 lnetctl set large_buffers 256
754 lnetctl set routing 1
758 .SS "Importing YAML files for configuring"
761 lnetctl import lnet\.conf
764 lnetctl import < lnet\.conf
768 .SS "Exporting LNet Configuration"
771 lnetctl export lnet\.conf
774 lnetctl export > lnet\.conf
778 .SS "Showing LNet Stats"
823 .SS "Showing peer information"
834 \- primary nid: 10\.148\.0\.8@o2ib
843 \- nid: 10\.148\.0\.8@o2ib
849 \- primary nid: 10\.148\.0\.20@o2ib
858 \- nid: 10\.148\.0\.20@o2ib
864 \- nid: 10\.148\.0\.25@o2ib
874 lnetctl udsp add \-\-src tcp \-\-priority 1
880 .SS "Deleting a UDSP"
883 lnetctl udsp del \-\-idx 0