Whamcloud - gitweb
LU-6142 lnet: SPDX for lnet/include/ and misc files
[fs/lustre-release.git] / lnet / doc / lnetctl.8
1 .\" SPDX-License-Identifier: GPL-2.0
2 .
3 .TH lnetctl 8 "2017 Jan 12" Lustre "configuration utilities"
4 .
5 .SH "SYNOPSIS"
6 \fBlnetctl\fR
7 .
8 .br
9 .B lnetctl --list-commands
10 .br
11 \fBlnetctl\fR \fB<cmd> <subcmd> [optional parameters]\fR
12 .
13 .br
14 .SH "DESCRIPTION"
15 \fBlnetctl\fR is used to configure LNet parameters allowing various configuration
16 and debugging features to be accessed\.
17 .
18 .P
19 \fBlnetctl\fR can be invoked in interactive mode by issuing lnetctl command\.
20 After that, commands are issued as below\.
21 .
22 .P
23 To get a complete listing of available commands, type
24 .B --list-commands
25 at the lnetctl prompt\. To get basic help on the meaning and syntax of a command
26 type \fB<command>\fR \-\-help\.
27 .
28 .P
29 For non\-interactive use the \fBlnetctl\fR utility can be invoked from the
30 command line as follows:
31 .
32 .P
33 lnetctl \fIcommand\fR \fIsubcommand\fR [optional parameters]
34 .
35 .SS "LNet Initialization:"
36 .
37 .TP
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\.
42 .
43 .TP
44 \fBlnetctl lnet\fR unconfigure
45 Brings down the LNet Network Interface (NI) system including any configured
46 networks\.
47 .
48 .SS "Network Configuration"
49 .
50 .TP
51 \fBlnetctl net\fR add
52 Configures a network interface either given the network name and physical
53 interface device name, or given the ip2net parameter\. Other parameters
54 are optional\.
55 .
56 .br
57 \-\-net: net name (e.g. tcp0)
58 .
59 .br
60 \-\-if: physical interface (e.g. eth0)
61 .
62 .br
63 \-\-nid: LNet network address to bring up. Cannot be combined with \-\-net.
64 .
65 .br
66 \-\-ip2net: specify networks based on IP address patterns
67 .
68 .br
69 \-\-peer\-timeout: time to wait before declaring a peer dead (in seconds).
70 Default value for o2iblnd and socklnd is 180 seconds.
71 .
72 .br
73 \-\-peer\-credits: define the max number of in\-flight messages per peer.
74 .
75 .br
76 \-\-peer\-buffer\-credits: the max number of routed in\-flight messages
77 per peer.
78 .
79 .br
80 \-\-credits: The total number of in\-flight messages over a network interface.
81 .
82 .br
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,
87 1]
88 .
89 .br
90
91 .
92 .TP
93 \fBlnetctl net\fR del
94 Delete a network interface given the network name\.
95 .
96 .br
97 \-\-net: net name (e.g. tcp0)
98 .
99 .br
100 \-\-nid: lnet network address to bring up. Cannot be combined with \-\-net.
101 .
102 .br
103 .
104 .TP
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
108 parameter\.
109 .
110 .br
111 \-\-net: net name (e.g. tcp0) to filter on
112 .
113 .br
114 \-\-verbose: display detailed output per network
115
116 .
117 .SS "Peer Configuration"
118 .TP
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\.
121 .
122 .br
123 .
124 \-\-nid: one or more peer NIDs to add to the peer\.
125 .
126 .br
127 .
128 \-\-prim_nid: Primary NID of the peer\.
129 .
130 .br
131 \-\-non_mr: create this peer as not Multi-Rail capable\.
132 .
133 .br
134 \-\-lock_prim: lock primary NID of the peer for the purpose of identification with Lustre\.
135 .
136 .br
137
138 .TP
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.
141 .
142 .br
143 .
144 \-\-nid: one or more peer NIDs to remove from the peer\.
145 .
146 .br
147 .
148 \-\-prim_nid: Primary NID of the peer\.
149 .
150 .br
151 \-\-force: optional, use to delete a peer with primary NID locked\.
152 .
153 .br
154
155 .TP
156 \fBlnetctl peer\fR show
157 Show configured peers.  By default, lists all peers and associated NIDs.
158 .
159 .br
160 .
161 \-\-nid: list of primary nids to filter on
162 .
163 .br
164 .
165 \-\-verbose: Include extended statistics, including credits and counters.
166 .
167 .br
168
169 .
170 .SS "Route Configuration"
171 .
172 .TP
173 \fBlnetctl route\fR add
174 Add a route\.
175 .
176 .br
177 \-\-net: net name (e.g. tcp0)
178 .
179 .br
180 \-\-gateway: gateway nid (e.g. 10\.1\.1\.2@tcp)
181 .
182 .br
183 \-\-hop: number to final destination (1 < hops < 255)
184 .
185 .br
186 \-\-priority: priority of route (0 \- highest prio)
187 .
188 .br
189
190 .
191 .TP
192 \fBlnetctl route\fR del
193 Delete a route specified via the network and gateway\.
194 .
195 .br
196 \-\-net: net name (e.g. tcp0)
197 .
198 .br
199 \-\-gateway: gateway nid (e.g. 10\.1\.1\.2@tcp)
200 .
201 .br
202
203 .
204 .TP
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
208 parameter\.
209 .
210 .br
211 \-\-net: net name (e.g. tcp0) to filter on
212 .
213 .br
214 \-\-gateway: gateway nid (e.g. 10\.1\.1\.2@tcp) to filter on
215 .
216 .br
217 \-\-hop: number to final destination (1 < hops < 255) to filter on
218 .
219 .br
220 \-\-priority: priority of route (0 \- highest prio to filter on)
221 .
222 .br
223 \-\-verbose: display detailed output per route
224 .
225 .br
226
227 .
228 .SS "Routing Information"
229 .
230 .TP
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)
234 .
235 .SS "Value Setting"
236 Individual values can be set using the \fBlnetctl set\fR command\.
237 .
238 .TP
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\.
242 .
243 .TP
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\.
247 .
248 .TP
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\.
252 .
253 .TP
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
258 count will be used\.
259 .
260 .TP
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\.
265 .
266 .TP
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\.
275 .
276 .TP
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\.
281 .
282 .TP
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.
288 .
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
293 file\.
294 .
295 .P
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\.
298 .
299 .TP
300 \fBlnetctl import\fR \fIFILE\fR:
301
302 .
303 .TP
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\.
309 .
310 .br
311 \-\-add: add configuration
312 .
313 .br
314 \-\-del: delete configuration
315 .
316 .br
317 \-\-show: show configuration
318 .
319 .br
320 \-\-exec: execute command
321 .
322 .br
323 \-\-help: display this help
324 .
325 .TP
326 \fBlnetctl export\fR \fIFILE\fR:
327
328 .
329 .TP
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\.
334 .
335 .br
336 \-\-backup: dump only elements necessary to recreate the current configuration.
337 .
338 .br
339 \-\-help: display this help
340 .
341 .SS "LNet Statistics"
342 .
343 .TP
344 \fBlnetctl stats\fR show
345 Show LNET statistics
346 .
347 .br
348 \-> Number of messages allocated
349 .
350 .br
351 \-> Maximum number of messages allocated
352 .
353 .br
354 \-> Number of errors encountered
355 .
356 .br
357 \-> Number of messages sent
358 .
359 .br
360 \-> Number of messages received
361 .
362 .br
363 \-> Number of messages routed
364 .
365 .br
366 \-> Total size in bytes of messages sent
367 .
368 .br
369 \-> Total size in bytes of messages received
370 .
371 .br
372 \-> Total size in bytes of messages routed
373 .
374 .br
375 \-> Total size in bytes of messages dropped
376 .
377 .br
378
379 .
380 .SS "Showing Peer Credits"
381 .
382 .TP
383 \fBlnetctl peer_credits\fR
384 Show details on configured peer credits
385 .
386 .br
387 \-> Peer nid
388 .
389 .br
390 \-> State
391 .
392 .br
393 \-> Reference count on the peer
394 .
395 .br
396 \-> Maximum transmit credits
397 .
398 .br
399 \-> Available transmit credits
400 .
401 .br
402 \-> Available router credits
403 .
404 .br
405 \-> Minimum router credits\.
406 .
407 .SS "UDSP Configuration"
408 .
409 .TP
410 \fBlnetctl udsp\fR add
411 Add user-defined selection policy.
412 .
413 .br
414 .
415 .TP
416 Adding a local network udsp.
417 .
418 .br
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\.
422 .
423 .br
424 \-\-src : network in NID-range syntax (e.g. tcp0 or tcp[1-3])
425 .
426 .br
427 \-\-<priority> <priority value>: optional priority value in [0-255], 0 as the highest
428 .
429 .br
430 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
431 .
432 .br
433 .
434 .TP
435 Adding a local NID udsp.
436 .
437 .br
438 Assign priority to local NIDs\. After a local network is chosen, the NI with highest priority is selected\.
439 .
440 .br
441 \-\-src: NID in NID-range syntax (e.g. 10.1.1.2@tcp or 10.1.1.*@tcp)
442 .
443 .br
444 \-\-<priority> <priority value>: optional priority value in [0-255], 0 as the highest
445 .
446 .br
447 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
448 .
449 .br
450 .
451 .TP
452 Adding a peer NID udsp.
453 .
454 .br
455 Assign priority to peer NIDs. Peer NID with highest priority is selected to send to\.
456 .
457 .br
458 \-\-dst: NID in NID-range syntax (e.g. 10.1.1.2@tcp)
459 .
460 .br
461 \-\-<priority> <priority value>: optional priority value in [0-255], 0 as the highest
462 .
463 .br
464 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
465 .
466 .br
467 .
468 .TP
469 Adding a NID pair udsp.
470 .
471 .br
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\.
474 .
475 .br
476 \-\-dst: NID in NID-range syntax (e.g. 10.1.1.1@tcp)
477 .
478 .br
479 \-\-src: NID in NID-range syntax (e.g. 10.1.1.2@tcp)
480 .
481 .br
482 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
483 .
484 .br
485 .
486 .TP
487 Adding a Peer Router udsp.
488 .
489 .br
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\.
492 .
493 .br
494 \-\-dst: peer NID in NID-range syntax (e.g. 10.1.1.1@tcp)
495 .
496 .br
497 \-\-rte: router NID in NID-range syntax (e.g. 10.1.2.1@tcp)
498 .
499 .br
500 \-\-<idx>: The index of where to insert the rule\. By default append to the end of the list
501 .
502 .br
503 .
504 .TP
505 \fBlnetctl udsp\fR del
506 Delete user-defined selection policy.
507 .
508 .br
509 \-\-idx: The index of the rule to delete\.
510 .
511 .br
512 .TP
513 \fBlnetctl udsp\fR show
514 Show all user-defined selection policies in the system\. The policies are dumped in YAML form\.
515 .
516 .SS "Debugging"
517 .
518 .TP
519 \fBlnetctl debug\fR recovery
520 List NIDs on recovery queue
521 .
522 .br
523 \-\-local : list NIDs on local recovery queue
524 .
525 .br
526 \-\-peer : list NIDs on peer recovery queue
527 .
528 .br
529 .
530 .TP
531 \fBlnetctl debug\fR peer
532 Dump peer debug info to debug log and console
533 .
534 .br
535 \-\-nid : peer's NID
536 .
537 .br
538 .
539 .SH "OPTIONS"
540 .TP
541 .B --list-commands
542 Output a list of the commands supported by the lnetctl utility
543 .SH "EXAMPLES"
544 .
545 .SS "Initializing LNet after load"
546 .
547 .IP "\(bu" 4
548 lnetctl lnet configure
549 .
550 .IP "\(bu" 4
551 lnetctl lnet configure \-\-all
552 .
553 .IP "" 0
554 .
555 .SS "Shutting down LNet"
556 .
557 .IP "\(bu" 4
558 lnetctl lnet unconfigure
559 .
560 .IP "" 0
561 .
562 .SS "Add network"
563 .
564 .IP "\(bu" 4
565 lnetctl net add \-\-net tcp0 \-\-if eth0
566 .
567 .IP "\(bu" 4
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]"
570 .
571 .IP "" 0
572 .
573 .SS "Delete network"
574 .
575 .IP "\(bu" 4
576 lnetctl net del \-\-net tcp0
577 .
578 .IP "" 0
579 .
580 .SS "Show network"
581 .
582 .TP
583 lnetctl net show \-\-verbose:
584
585 .
586 .P
587 net:
588 .
589 .br
590         \- nid: 0@lo
591 .
592 .br
593           status: up
594 .
595 .br
596           tunables:
597 .
598 .br
599                 peer_timeout: 0
600 .
601 .br
602                 peer_credits: 0
603 .
604 .br
605                 peer_buffer_credits: 0
606 .
607 .br
608                 credits: 0
609 .
610 .br
611         \- nid: 192\.168\.205\.130@tcp1
612 .
613 .br
614           status: up
615 .
616 .br
617           interfaces:
618 .
619 .br
620                 0: eth3
621 .
622 .br
623                 1: eth4
624 .
625 .br
626           tunables:
627 .
628 .br
629                 peer_timeout: 180
630 .
631 .br
632                 peer_credits: 8
633 .
634 .br
635                 peer_buffer_credits: 0
636 .
637 .br
638                 credits: 256
639 .
640 .br
641 .
642 .SS "Add route"
643 .
644 .IP "\(bu" 4
645 lnetctl route add \-\-net tcp0 \-\-gateway 10\.10\.10\.1@tcp1 \-\-hop 1
646 \-\-priority 1
647 .
648 .IP "" 0
649 .
650 .SS "Delete route"
651 .
652 .IP "\(bu" 4
653 lnetctl route del \-\-net tcp0 \-\-gateway 10\.10\.10\.1@tcp1
654 .
655 .IP "" 0
656 .
657 .SS "Show route"
658 .
659 .IP "\(bu" 4
660 lnetctl route show \-\-verbose
661 .
662 .IP "" 0
663 .
664 .P
665 route:
666 .
667 .br
668         \- net: tcp
669 .
670 .br
671           gateway: 192\.168\.205\.131@tcp1
672 .
673 .br
674           hop: 1
675 .
676 .br
677           priority: 0 state: down
678 .
679 .br
680 .
681 .SS "Show routing"
682 .
683 .IP "\(bu" 4
684 lnetctl routing show
685 .
686 .IP "" 0
687 .
688 .P
689 routing:
690 .
691 .br
692         \- cpt[0]:
693 .
694 .br
695           tiny:
696 .
697 .br
698                 npages: 0
699 .
700 .br
701                 nbuffers: 2048
702 .
703 .br
704                 credits: 2048
705 .
706 .br
707                 mincredits: 2048
708 .
709 .br
710           small:
711 .
712 .br
713                 npages: 1
714 .
715 .br
716                 nbuffers: 16384
717 .
718 .br
719                 credits: 16384
720 .
721 .br
722                 mincredits: 16384
723 .
724 .br
725           large:
726 .
727 .br
728                 npages: 256
729 .
730 .br
731                 nbuffers: 1024
732 .
733 .br
734                 credits: 1024
735 .
736 .br
737                 mincredits: 1024
738 .
739 .br
740         \- enable: 1
741 .
742 .SS "Setting variables"
743 .
744 .IP "\(bu" 4
745 lnetctl set tiny_buffers 2048
746 .
747 .IP "\(bu" 4
748 lnetctl set small_buffers 16384
749 .
750 .IP "\(bu" 4
751 lnetctl set large_buffers 256
752 .
753 .IP "\(bu" 4
754 lnetctl set routing 1
755 .
756 .IP "" 0
757 .
758 .SS "Importing YAML files for configuring"
759 .
760 .IP "\(bu" 4
761 lnetctl import lnet\.conf
762 .
763 .IP "\(bu" 4
764 lnetctl import < lnet\.conf
765 .
766 .IP "" 0
767 .
768 .SS "Exporting LNet Configuration"
769 .
770 .IP "\(bu" 4
771 lnetctl export lnet\.conf
772 .
773 .IP "\(bu" 4
774 lnetctl export > lnet\.conf
775 .
776 .IP "" 0
777 .
778 .SS "Showing LNet Stats"
779 .
780 .IP "\(bu" 4
781 lnetctl stats show
782 .
783 .IP "" 0
784 .
785 .P
786 statistics:
787 .
788 .br
789         msgs_alloc: 0
790 .
791 .br
792         msgs_max: 1
793 .
794 .br
795         errors: 0
796 .
797 .br
798         send_count: 89
799 .
800 .br
801         recv_count: 0
802 .
803 .br
804         route_count: 0
805 .
806 .br
807         drop_count: 19
808 .
809 .br
810         send_length: 0
811 .
812 .br
813         recv_length: 0
814 .
815 .br
816         route_length: 0
817 .
818 .br
819         drop_length: 0
820 .
821 .br
822 .
823 .SS "Showing peer information"
824 .
825 .IP "\(bu" 4
826 lnetctl peer show
827 .
828 .IP "" 0
829 .
830 .P
831 peer:
832 .
833 .br
834     \- primary nid: 10\.148\.0\.8@o2ib
835 .
836 .br
837       Multi\-Rail: True
838 .
839 .br
840       peer ni:
841 .
842 .br
843         \- nid: 10\.148\.0\.8@o2ib
844 .
845 .br
846           state: NA
847 .
848 .br
849     \- primary nid: 10\.148\.0\.20@o2ib
850 .
851 .br
852       Multi\-Rail: True
853 .
854 .br
855       peer ni:
856 .
857 .br
858         \- nid: 10\.148\.0\.20@o2ib
859 .
860 .br
861           state: NA
862 .
863 .br
864         \- nid: 10\.148\.0\.25@o2ib
865 .
866 .br
867           state: NA
868 .
869 .br
870 .
871 .SS "Adding a UDSP"
872 .
873 .IP "\(bu" 4
874 lnetctl udsp add \-\-src tcp \-\-priority 1
875 .
876 .IP "" 0
877 .
878 .P
879 .
880 .SS "Deleting a UDSP"
881 .
882 .IP "\(bu" 4
883 lnetctl udsp del \-\-idx 0
884 .
885 .IP "" 0
886 .
887 .P
888 .SS "Show UDSPs"
889 .
890 .IP "\(bu" 4
891 lnetctl udsp show
892 .
893 .IP "" 0
894 .
895 .P
896 udsp:
897 .
898 .br
899     \- idx: 0
900 .
901 .br
902     src: tcp
903 .
904 .br
905     dst: NA
906 .
907 .br
908     rte: NA
909 .
910 .br
911     action:
912 .
913 .br
914         priority: 0
915 .
916 .br
917
918 .SH SEE ALSO
919 .BR lustre (7)
920