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