| lnetctl(8) | configuration utilities | lnetctl(8) |
SYNOPSIS
lnetctl
lnetctl --list-commands
lnetctl <cmd> <subcmd> [optional parameters]
DESCRIPTION
lnetctl is used to configure LNet parameters allowing various configuration and debugging features to be accessed.
lnetctl can be invoked in interactive mode by issuing lnetctl command. After that, commands are issued as below.
To get a complete listing of available commands, type --list-commands at the lnetctl prompt. To get basic help on the meaning and syntax of a command type <command> --help.
For non-interactive use the lnetctl utility can be invoked from the command line as follows:
lnetctl command subcommand [optional parameters]
LNet Initialization:
- lnetctl lnet configure [--all]
- Brings up the LNet Network Interface (NI) system. If the --all option is provided it will load network interfaces defined in the modprobe files. Otherwise, it doesn´t initialize any networks by default.
- lnetctl lnet unconfigure
- Brings down the LNet Network Interface (NI) system including any configured networks.
Network Configuration
- lnetctl net add
- Configures a network interface either given the network name and physical
interface device name, or given the ip2net parameter. Other parameters are
optional.
--net: net name (e.g. tcp0)
--if: physical interface (e.g. eth0)
--nid: LNet network address to bring up. Cannot be combined with --net.
--ip2net: specify networks based on IP address patterns
--peer-timeout: time to wait before declaring a peer dead (in seconds). Default value for o2iblnd and socklnd is 180 seconds.
--peer-credits: define the max number of in-flight messages per peer.
--peer-buffer-credits: the max number of routed in-flight messages per peer.
--credits: The total number of in-flight messages over a network interface.
--cpt: The CPU partitions on which the created network interface is bound to. Refer to the Lustre Manual Section "Binding Network Interface Against CPU Partitions" for more details. For example to bind a Network Interface to CPU partitions 0 and 1, you would specify this parameter as --cpt [0, 1] - lnetctl net del
- Delete a network interface given the network name.
--net: net name (e.g. tcp0)
--nid: lnet network address to bring up. Cannot be combined with --net.
- lnetctl net show
- Show all currently configured network interfaces if no parameters given or
filter on the network name. More details can be shown by specifying the
--verbose parameter.
--net: net name (e.g. tcp0) to filter on
--verbose: display detailed output per network
Peer Configuration
- lnetctl peer add
- 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.
--nid: one or more peer NIDs to add to the peer.
--prim_nid: Primary NID of the peer.
--non_mr: create this peer as not Multi-Rail capable.
--lock_prim: lock primary NID of the peer for the purpose of identification with Lustre. - lnetctl peer 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.
--nid: one or more peer NIDs to remove from the peer.
--prim_nid: Primary NID of the peer.
--force: optional, use to delete a peer with primary NID locked. - lnetctl peer show
- Show configured peers. By default, lists all peers and associated NIDs.
--nid: list of primary nids to filter on
--verbose: Include extended statistics, including credits and counters.
Route Configuration
- lnetctl route add
- Add a route.
--net: net name (e.g. tcp0)
--gateway: gateway nid (e.g. 10.1.1.2@tcp)
--hop: number to final destination (1 < hops < 255)
--priority: priority of route (0 - highest prio) - lnetctl route del
- Delete a route specified via the network and gateway.
--net: net name (e.g. tcp0)
--gateway: gateway nid (e.g. 10.1.1.2@tcp) - lnetctl route show
- Show all currently configured routes if no parameters given, or filter on
given parameters. More details can be shown by specifying the --verbose
parameter.
--net: net name (e.g. tcp0) to filter on
--gateway: gateway nid (e.g. 10.1.1.2@tcp) to filter on
--hop: number to final destination (1 < hops < 255) to filter on
--priority: priority of route (0 - highest prio to filter on)
--verbose: display detailed output per route
Routing Information
- lnetctl routing show
- Show router buffers values as well as show the status of routing (IE: whether the node is set to be a router)
Value Setting
Individual values can be set using the lnetctl set command.
- lnetctl set tiny_buffers value
- Set the number of tiny buffers in the system. This is the total number of tiny buffers for all CPU partitions.
- lnetctl set small_buffers value
- Set the number of small buffers in the system. This is the total number of small buffers for all CPU partitions.
- lnetctl set large_buffers value
- Set the number of large buffers in the system. This is the total number of large buffers for all CPU partitions.
- lnetctl set routing [0, 1]
- 0 value indicates to disable routing. 1 value indicates to enable routing. When routing is disabled the values of the buffers that might have been changed are not remembered, and the next time routing is enabled the default buffer count will be used.
- lnetctl set drop_asym_route [0, 1]
- 0 value indicates to accept asymmetrical route messages. 1 value indicates to drop them. Asymmetrical route is when a message from a remote peer is coming through a router that would not be used by this node to reach the remote peer.
- lnetctl set latency_stats [0, 1]
- 0 value indicates to stop accumulating per-operation latency statistics. 1 value indicates to accumulate them (default). The latency statistics are reported by lnetctl net show -v and lnetctl peer show -v. The global counters and the per-interface element statistics are not affected by this setting.
- lnetctl set response_tracking [0, 1, 2, 3]
- Set the behavior of response tracking.
0 - Only LNet pings and discovery pushes utilize response tracking.
1 - GETs are eligible for response tracking.
2 - PUTs are eligible for response tracking.
3 - Both PUTs and GETs are eligible for response tracking (default).
Note: Regardless of the value of the response_tracking parameter LNet
pings and discovery pushes always utilize response tracking. - lnetctl set recovery_limit value
- Set how long LNet will attempt to recover unhealthy peer interfaces.
0 - Recover indefinitely (default).
>0 - Recover for the specified number of seconds. - lnetctl set max_recovery_ping_interval value
- Set the maximum recovery ping interval. The recovery ping mechanism increases the next scheduled recovery ping attempt timeout exponentially (base 2) until it is equal to the value set. The default value is 900.
Import and Export YAML Configuration Files
LNet configuration can be represented in YAML format. A YAML configuration file can be passed to the lnetctl utility via the import command. The lnetctl utility will attempt to configure all elements defined in the YAML file.
Similarly the export command can be used to dump all supported LNet configuration to stdout. The output can be redirected to a file.
- lnetctl import FILE:
- lnetctl import < FILE
- import command uses the specified YAML configuration file to
configure LNet parameters defined within. The import command by default
adds the LNet parameters defined in the YAML file, but this default
behavior can be overwritten by specifying the desired behavior.
--add: add configuration
--del: delete configuration
--show: show configuration
--exec: execute command
--help: display this help - lnetctl export FILE:
- lnetctl export > FILE
- export command dumps the LNet configuration, state information, and
stats in YAML format to stdout, which can be redirected to a normal file.
The output of the export command can be used as input to the
import command.
--backup: dump only elements necessary to recreate the current configuration.
--help: display this help
LNet Statistics
- lnetctl stats show
- Show LNET statistics
-> Number of messages allocated
-> Maximum number of messages allocated
-> Number of errors encountered
-> Number of messages sent
-> Number of messages received
-> Number of messages routed
-> Total size in bytes of messages sent
-> Total size in bytes of messages received
-> Total size in bytes of messages routed
-> Total size in bytes of messages dropped
Showing Peer Credits
- lnetctl peer_credits
- Show details on configured peer credits
-> Peer nid
-> State
-> Reference count on the peer
-> Maximum transmit credits
-> Available transmit credits
-> Available router credits
-> Minimum router credits.
UDSP Configuration
- lnetctl udsp add
- Add user-defined selection policy.
- Adding a local network udsp.
-
If multiple local networks are available, each one can be assigned a priority. The one with the highest priority is selected to send on. NID and network matching is using NID-range syntax, please see the manual for more detail.
--src : network in NID-range syntax (e.g. tcp0 or tcp[1-3])
--<priority> <priority value>: optional priority value in [0-255], 0 as the highest
--<idx>: The index of where to insert the rule. By default append to the end of the list
- Adding a local NID udsp.
-
Assign priority to local NIDs. After a local network is chosen, the NI with highest priority is selected.
--src: NID in NID-range syntax (e.g. 10.1.1.2@tcp or 10.1.1.*@tcp)
--<priority> <priority value>: optional priority value in [0-255], 0 as the highest
--<idx>: The index of where to insert the rule. By default append to the end of the list
- Adding a peer NID udsp.
-
Assign priority to peer NIDs. Peer NID with highest priority is selected to send to.
--dst: NID in NID-range syntax (e.g. 10.1.1.2@tcp)
--<priority> <priority value>: optional priority value in [0-255], 0 as the highest
--<idx>: The index of where to insert the rule. By default append to the end of the list
- Adding a NID pair udsp.
-
The local NIDs which match the rule are added on a list on the peer NIs matching the rule. When selecting the peer NI, the one with the local NID being used on its list is preferred.
--dst: NID in NID-range syntax (e.g. 10.1.1.1@tcp)
--src: NID in NID-range syntax (e.g. 10.1.1.2@tcp)
--<idx>: The index of where to insert the rule. By default append to the end of the list
- Adding a Peer Router udsp.
-
The router NIDs matching the rule are added on a list on the peer NIs matching the rule. When sending to a remote peer, the router which has its nid on the peer NI list is preferred.
--dst: peer NID in NID-range syntax (e.g. 10.1.1.1@tcp)
--rte: router NID in NID-range syntax (e.g. 10.1.2.1@tcp)
--<idx>: The index of where to insert the rule. By default append to the end of the list
- lnetctl udsp del
- Delete user-defined selection policy.
--idx: The index of the rule to delete.
- lnetctl udsp show
- Show all user-defined selection policies in the system. The policies are dumped in YAML form.
Debugging
- lnetctl debug recovery
- List NIDs on recovery queue
--local : list NIDs on local recovery queue
--peer : list NIDs on peer recovery queue
- lnetctl debug peer
- Dump peer debug info to debug log and console
--nid : peer's NID
OPTIONS
- --list-commands
- Output a list of the commands supported by the lnetctl utility
EXAMPLES
Initializing LNet after load
- lnetctl lnet configure
- lnetctl lnet configure --all
Shutting down LNet
- •
- lnetctl lnet unconfigure
Add network
- lnetctl net add --net tcp0 --if eth0
- lnetctl net add --ip2net "tcp0(eth0) 192.168.0.[2,4]; tcp0 192.168.0.*; o2ib0 132.6.[1-3].[2-8/2]"
Delete network
- •
- lnetctl net del --net tcp0
Show network
net:
- nid: 0@lo
status: up
tunables:
peer_timeout: 0
peer_credits: 0
peer_buffer_credits: 0
credits: 0
- nid: 192.168.205.130@tcp1
status: up
interfaces:
0: eth3
1: eth4
tunables:
peer_timeout: 180
peer_credits: 8
peer_buffer_credits: 0
credits: 256
Add route
- •
- lnetctl route add --net tcp0 --gateway 10.10.10.1@tcp1 --hop 1 --priority 1
Delete route
- •
- lnetctl route del --net tcp0 --gateway 10.10.10.1@tcp1
Show route
- •
- lnetctl route show --verbose
route:
- net: tcp
gateway: 192.168.205.131@tcp1
hop: 1
priority: 0 state: down
Show routing
- •
- lnetctl routing show
routing:
- cpt[0]:
tiny:
npages: 0
nbuffers: 2048
credits: 2048
mincredits: 2048
small:
npages: 1
nbuffers: 16384
credits: 16384
mincredits: 16384
large:
npages: 256
nbuffers: 1024
credits: 1024
mincredits: 1024
- enable: 1
Setting variables
- lnetctl set tiny_buffers 2048
- lnetctl set small_buffers 16384
- lnetctl set large_buffers 256
- lnetctl set routing 1
Importing YAML files for configuring
- lnetctl import lnet.conf
- lnetctl import < lnet.conf
Exporting LNet Configuration
- lnetctl export lnet.conf
- lnetctl export > lnet.conf
Showing LNet Stats
- •
- lnetctl stats show
statistics:
msgs_alloc: 0
msgs_max: 1
errors: 0
send_count: 89
recv_count: 0
route_count: 0
drop_count: 19
send_length: 0
recv_length: 0
route_length: 0
drop_length: 0
p2pdma_send_count: 0
p2pdma_recv_count: 0
Showing peer information
- •
- lnetctl peer show
peer:
- primary nid: 10.148.0.8@o2ib
Multi-Rail: True
peer ni:
- nid: 10.148.0.8@o2ib
state: NA
- primary nid: 10.148.0.20@o2ib
Multi-Rail: True
peer ni:
- nid: 10.148.0.20@o2ib
state: NA
- nid: 10.148.0.25@o2ib
state: NA
Adding a UDSP
- •
- lnetctl udsp add --src tcp --priority 1
Deleting a UDSP
- •
- lnetctl udsp del --idx 0
Show UDSPs
- •
- lnetctl udsp show
udsp:
- idx: 0
src: tcp
dst: NA
rte: NA
action:
priority: 0
SEE ALSO
| 2017 Jan 12 | Lustre |