Whamcloud - gitweb
New release 2.12.7
[fs/lustre-release.git] / lustre / doc / lnetctl.8
1 .
2 .TH lnetctl 8 "2017 Jan 12" Lustre "configuration utilities"
3 .
4 .SH "SYNOPSIS"
5 \fBlnetctl\fR
6 .
7 .br
8 .B lnetctl --list-commands
9 .br
10 \fBlnetctl\fR \fB<cmd> <subcmd> [optional parameters]\fR
11 .
12 .br
13 .SH "DESCRIPTION"
14 \fBlnetctl\fR is used to configure LNet parameters allowing various configuration
15 and debugging features to be accessed\.
16 .
17 .P
18 \fBlnetctl\fR can be invoked in interactive mode by issuing lnetctl command\.
19 After that, commands are issued as below\.
20 .
21 .P
22 To get a complete listing of available commands, type
23 .B --list-commands
24 at the lnetctl prompt\. To get basic help on the meaning and syntax of a command
25 type \fB<command>\fR \-\-help\.
26 .
27 .P
28 For non\-interactive use the \fBlnetctl\fR utility can be invoked from the
29 command line as follows:
30 .
31 .P
32 lnetctl \fIcommand\fR \fIsubcommand\fR [optional parameters]
33 .
34 .SS "LNet Initialization:"
35 .
36 .TP
37 \fBlnetctl lnet\fR configure [\-\-all]
38 Brings up the LNet Network Interface (NI) system\. If the \-\-all option is
39 provided it will load network interfaces defined in the modprobe files\.
40 Otherwise, it doesn\'t initialize any networks by default\.
41 .
42 .TP
43 \fBlnetctl lnet\fR unconfigure
44 Brings down the LNet Network Interface (NI) system including any configured
45 networks\.
46 .
47 .SS "Network Configuration"
48 .
49 .TP
50 \fBlnetctl net\fR add
51 Configures a network interface either given the network name and physical
52 interface device name, or given the ip2net parameter\. Other parameters
53 are optional\.
54 .
55 .br
56 \-\-net: net name (e.g. tcp0)
57 .
58 .br
59 \-\-if: physical interface (e.g. eth0)
60 .
61 .br
62 \-\-ip2net: specify networks based on IP address patterns
63 .
64 .br
65 \-\-peer\-timeout: time to wait before declaring a peer dead (in seconds).
66 Default value for o2iblnd and socklnd is 180 seconds.
67 .
68 .br
69 \-\-peer\-credits: define the max number of in\-flight messages per peer.
70 .
71 .br
72 \-\-peer\-buffer\-credits: the max number of routed in\-flight messages
73 per peer.
74 .
75 .br
76 \-\-credits: The total number of in\-flight messages over a network interface.
77 .
78 .br
79 \-\-cpt: The CPU partitions on which the created network interface is bound to.
80 Refer to the Lustre Manual Section "Binding Network Interface Against CPU
81 Partitions" for more details. For example to bind a Network Interface to
82 CPU partitions 0 and 1, you would specify this parameter as \-\-cpt [0,
83 1]
84 .
85 .br
86
87 .
88 .TP
89 \fBlnetctl net\fR del
90 Delete a network interface given the network name\.
91 .
92 .br
93 \-\-net: net name (e.g. tcp0)
94 .
95 .br
96
97 .
98 .TP
99 \fBlnetctl net\fR show
100 Show all currently configured network interfaces if no parameters given or filter
101 on the network name\. More details can be shown by specifying the \-\-verbose
102 parameter\.
103 .
104 .br
105 \-\-net: net name (e.g. tcp0) to filter on
106 .
107 .br
108 \-\-verbose: display detailed output per network
109
110 .
111 .SS "Peer Configuration"
112 .TP
113 \fBlnetctl peer\fR add
114 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.
115 .
116 .br
117 .
118 \-\-nid: one or more peer NIDs to add to the peer\.
119 .
120 .br
121 .
122 \-\-prim_nid: Primary NID of the peer\.
123 .
124 .br
125 \-\-non_mr: create this peer as not Multi-Rail capable\.
126 .
127 .br
128
129 .TP
130 \fBlnetctl peer\fR del
131 Delete a peer NID.  The primary NID must be specified.  If the removed NID is the primary NID, the peer entry will be deleted.
132 .
133 .br
134 .
135 \-\-nid: one or more peer NIDs to remove from the peer\.
136 .
137 .br
138 .
139 \-\-prim_nid: Primary NID of the peer\.
140 .
141 .br
142
143 .TP
144 \fBlnetctl peer\fR show
145 Show configured peers.  By default, lists all peers and associated NIDs.
146 .
147 .br
148 .
149 \-\-nid: list of primary nids to filter on
150 .
151 .br
152 .
153 \-\-verbose: Include extended statistics, including credits and counters.
154 .
155 .br
156
157 .
158 .SS "Route Configuration"
159 .
160 .TP
161 \fBlnetctl route\fR add
162 Add a route\.
163 .
164 .br
165 \-\-net: net name (e.g. tcp0)
166 .
167 .br
168 \-\-gateway: gateway nid (e.g. 10\.1\.1\.2@tcp)
169 .
170 .br
171 \-\-hop: number to final destination (1 < hops < 255)
172 .
173 .br
174 \-\-priority: priority of route (0 \- highest prio)
175 .
176 .br
177
178 .
179 .TP
180 \fBlnetctl route\fR del
181 Delete a route specified via the network and gateway\.
182 .
183 .br
184 \-\-net: net name (e.g. tcp0)
185 .
186 .br
187 \-\-gateway: gateway nid (e.g. 10\.1\.1\.2@tcp)
188 .
189 .br
190
191 .
192 .TP
193 \fBlnetctl route\fR show
194 Show all currently configured routes if no parameters given, or filter on
195 given parameters\. More details can be shown by specifying the \-\-verbose
196 parameter\.
197 .
198 .br
199 \-\-net: net name (e.g. tcp0) to filter on
200 .
201 .br
202 \-\-gateway: gateway nid (e.g. 10\.1\.1\.2@tcp) to filter on
203 .
204 .br
205 \-\-hop: number to final destination (1 < hops < 255) to filter on
206 .
207 .br
208 \-\-priority: priority of route (0 \- highest prio to filter on)
209 .
210 .br
211 \-\-verbose: display detailed output per route
212 .
213 .br
214
215 .
216 .SS "Routing Information"
217 .
218 .TP
219 \fBlnetctl routing\fR show
220 Show router buffers values as well as show the status of routing (IE: whether
221 the node is set to be a router)
222 .
223 .SS "Value Setting"
224 Individual values can be set using the \fBlnetctl set\fR command\.
225 .
226 .TP
227 \fBlnetctl set\fR tiny_buffers \fIvalue\fR
228 Set the number of tiny buffers in the system\. This is the total number of tiny
229 buffers for all CPU partitions\.
230 .
231 .TP
232 \fBlnetctl set\fR small_buffers \fIvalue\fR
233 Set the number of small buffers in the system\. This is the total number of
234 small buffers for all CPU partitions\.
235 .
236 .TP
237 \fBlnetctl set\fR large_buffers \fIvalue\fR
238 Set the number of large buffers in the system\. This is the total number of
239 large buffers for all CPU partitions\.
240 .
241 .TP
242 \fBlnetctl set\fR routing \fI[0, 1]\fR
243 0 value indicates to disable routing\. 1 value indicates to enable routing\.
244 When routing is disabled the values of the buffers that might have been changed
245 are not remembered, and the next time routing is enabled the default buffer
246 count will be used\.
247 .
248 .TP
249 \fBlnetctl set\fR drop_asym_route \fI[0, 1]\fR
250 0 value indicates to accept asymmetrical route messages\. 1 value indicates to
251 drop them\. Asymmetrical route is when a message from a remote peer is coming
252 through a router that would not be used by this node to reach the remote peer\.
253 .
254 .SS "Import and Export YAML Configuration Files"
255 LNet configuration can be represented in YAML format\. A YAML configuration
256 file can be passed to the lnetctl utility via the \fBimport\fR command\. The
257 lnetctl utility will attempt to configure all elements defined in the YAML
258 file\.
259 .
260 .P
261 Similarly the \fBexport\fR command can be used to dump all supported LNet
262 configuration to stdout\. The output can be redirected to a file\.
263 .
264 .TP
265 \fBlnetctl import\fR \fIFILE\fR:
266
267 .
268 .TP
269 \fBlnetctl import\fR < \fIFILE\fR
270 \fBimport\fR command uses the specified YAML configuration file to configure
271 LNet parameters defined within\. The import command by default adds the LNet
272 parameters defined in the YAML file, but this default behavior can be
273 overwritten by specifying the desired behavior\.
274 .
275 .br
276 \-\-add: add configuration
277 .
278 .br
279 \-\-del: delete configuration
280 .
281 .br
282 \-\-show: show configuration
283 .
284 .br
285 \-\-exec: execute command
286 .
287 .br
288 \-\-help: display this help
289 .
290 .TP
291 \fBlnetctl export\fR \fIFILE\fR:
292
293 .
294 .TP
295 \fBlnetctl export\fR > \fIFILE\fR
296 \fBexport\fR command dumps the LNet configuration, state information, and stats
297 in YAML format to stdout, which can be redirected to a normal file\. The output
298 of the \fBexport\fR command can be used as input to the \fBimport\fR command\.
299 .
300 .br
301 \-\-backup: dump only elements necessary to recreate the current configuration.
302 .
303 .br
304 \-\-help: display this help
305 .
306 .SS "LNet Statistics"
307 .
308 .TP
309 \fBlnetctl stats\fR
310 Show LNET statistics
311 .
312 .br
313 \-> Number of messages allocated
314 .
315 .br
316 \-> Maximum number of messages allocated
317 .
318 .br
319 \-> Number of errors encountered
320 .
321 .br
322 \-> Number of messages sent
323 .
324 .br
325 \-> Number of messages received
326 .
327 .br
328 \-> Number of messages routed
329 .
330 .br
331 \-> Total size in bytes of messages sent
332 .
333 .br
334 \-> Total size in bytes of messages received
335 .
336 .br
337 \-> Total size in bytes of messages routed
338 .
339 .br
340 \-> Total size in bytes of messages dropped
341 .
342 .br
343
344 .
345 .SS "Showing Peer Credits"
346 .
347 .TP
348 \fBlnetctl peer_credits\fR
349 Show details on configured peer credits
350 .
351 .br
352 \-> Peer nid
353 .
354 .br
355 \-> State
356 .
357 .br
358 \-> Reference count on the peer
359 .
360 .br
361 \-> Maximum transmit credits
362 .
363 .br
364 \-> Available transmit credits
365 .
366 .br
367 \-> Available router credits
368 .
369 .br
370 \-> Minimum router credits\.
371 .
372 .SH "OPTIONS"
373 .TP
374 .B --list-commands
375 Output a list of the commands supported by the lnetctl utility
376 .SH "EXAMPLES"
377 .
378 .SS "Initializing LNet after load"
379 .
380 .IP "\(bu" 4
381 lnetctl lnet configure
382 .
383 .IP "\(bu" 4
384 lnetctl lnet configure \-\-all
385 .
386 .IP "" 0
387 .
388 .SS "Shutting down LNet"
389 .
390 .IP "\(bu" 4
391 lnetctl lnet unconfigure
392 .
393 .IP "" 0
394 .
395 .SS "Add network"
396 .
397 .IP "\(bu" 4
398 lnetctl net add \-\-net tcp0 \-\-if eth0
399 .
400 .IP "\(bu" 4
401 lnetctl net add \-\-ip2net "tcp0(eth0) 192\.168\.0\.[2,4]; tcp0 192\.168\.0\.*;
402 o2ib0 132\.6\.[1\-3]\.[2\-8/2]"
403 .
404 .IP "" 0
405 .
406 .SS "Delete network"
407 .
408 .IP "\(bu" 4
409 lnetctl net del \-\-net tcp0
410 .
411 .IP "" 0
412 .
413 .SS "Show network"
414 .
415 .TP
416 lnetctl net show \-\-verbose:
417
418 .
419 .P
420 net:
421 .
422 .br
423         \- nid: 0@lo
424 .
425 .br
426           status: up
427 .
428 .br
429           tunables:
430 .
431 .br
432                 peer_timeout: 0
433 .
434 .br
435                 peer_credits: 0
436 .
437 .br
438                 peer_buffer_credits: 0
439 .
440 .br
441                 credits: 0
442 .
443 .br
444         \- nid: 192\.168\.205\.130@tcp1
445 .
446 .br
447           status: up
448 .
449 .br
450           interfaces:
451 .
452 .br
453                 0: eth3
454 .
455 .br
456                 1: eth4
457 .
458 .br
459           tunables:
460 .
461 .br
462                 peer_timeout: 180
463 .
464 .br
465                 peer_credits: 8
466 .
467 .br
468                 peer_buffer_credits: 0
469 .
470 .br
471                 credits: 256
472 .
473 .br
474 .
475 .SS "Add route"
476 .
477 .IP "\(bu" 4
478 lnetctl route add \-\-net tcp0 \-\-gateway 10\.10\.10\.1@tcp1 \-\-hop 1
479 \-\-priority 1
480 .
481 .IP "" 0
482 .
483 .SS "Delete route"
484 .
485 .IP "\(bu" 4
486 lnetctl route del \-\-net tcp0 \-\-gateway 10\.10\.10\.1@tcp1
487 .
488 .IP "" 0
489 .
490 .SS "Show route"
491 .
492 .IP "\(bu" 4
493 lnetctl route show \-\-verbose
494 .
495 .IP "" 0
496 .
497 .P
498 route:
499 .
500 .br
501         \- net: tcp
502 .
503 .br
504           gateway: 192\.168\.205\.131@tcp1
505 .
506 .br
507           hop: 1
508 .
509 .br
510           priority: 0 state: down
511 .
512 .br
513 .
514 .SS "Show routing"
515 .
516 .IP "\(bu" 4
517 lnetctl routing show
518 .
519 .IP "" 0
520 .
521 .P
522 routing:
523 .
524 .br
525         \- cpt[0]:
526 .
527 .br
528           tiny:
529 .
530 .br
531                 npages: 0
532 .
533 .br
534                 nbuffers: 2048
535 .
536 .br
537                 credits: 2048
538 .
539 .br
540                 mincredits: 2048
541 .
542 .br
543           small:
544 .
545 .br
546                 npages: 1
547 .
548 .br
549                 nbuffers: 16384
550 .
551 .br
552                 credits: 16384
553 .
554 .br
555                 mincredits: 16384
556 .
557 .br
558           large:
559 .
560 .br
561                 npages: 256
562 .
563 .br
564                 nbuffers: 1024
565 .
566 .br
567                 credits: 1024
568 .
569 .br
570                 mincredits: 1024
571 .
572 .br
573         \- enable: 1
574 .
575 .SS "Setting variables"
576 .
577 .IP "\(bu" 4
578 lnetctl set tiny_buffers 2048
579 .
580 .IP "\(bu" 4
581 lnetctl set small_buffers 16384
582 .
583 .IP "\(bu" 4
584 lnetctl set large_buffers 256
585 .
586 .IP "\(bu" 4
587 lnetctl set routing 1
588 .
589 .IP "" 0
590 .
591 .SS "Importing YAML files for configuring"
592 .
593 .IP "\(bu" 4
594 lnetctl import lnet\.conf
595 .
596 .IP "\(bu" 4
597 lnetctl import < lnet\.conf
598 .
599 .IP "" 0
600 .
601 .SS "Exporting LNet Configuration"
602 .
603 .IP "\(bu" 4
604 lnetctl export lnet\.conf
605 .
606 .IP "\(bu" 4
607 lnetctl export > lnet\.conf
608 .
609 .IP "" 0
610 .
611 .SS "Showing LNet Stats"
612 .
613 .IP "\(bu" 4
614 lnetctl stats show
615 .
616 .IP "" 0
617 .
618 .P
619 statistics:
620 .
621 .br
622         msgs_alloc: 0
623 .
624 .br
625         msgs_max: 1
626 .
627 .br
628         errors: 0
629 .
630 .br
631         send_count: 89
632 .
633 .br
634         recv_count: 0
635 .
636 .br
637         route_count: 0
638 .
639 .br
640         drop_count: 19
641 .
642 .br
643         send_length: 0
644 .
645 .br
646         recv_length: 0
647 .
648 .br
649         route_length: 0
650 .
651 .br
652         drop_length: 0
653 .
654 .br
655 .
656 .SS "Showing peer information"
657 .
658 .IP "\(bu" 4
659 lnetctl peer show
660 .
661 .IP "" 0
662 .
663 .P
664 peer:
665 .
666 .br
667     \- primary nid: 10\.148\.0\.8@o2ib
668 .
669 .br
670       Multi\-Rail: True
671 .
672 .br
673       peer ni:
674 .
675 .br
676         \- nid: 10\.148\.0\.8@o2ib
677 .
678 .br
679           state: NA
680 .
681 .br
682     \- primary nid: 10\.148\.0\.20@o2ib
683 .
684 .br
685       Multi\-Rail: True
686 .
687 .br
688       peer ni:
689 .
690 .br
691         \- nid: 10\.148\.0\.20@o2ib
692 .
693 .br
694           state: NA
695 .
696 .br
697         \- nid: 10\.148\.0\.25@o2ib
698 .
699 .br
700           state: NA
701 .
702 .br
703
704 .SH SEE ALSO
705 .BR lustre (7)
706