How to Display Link status,speed,duplex,statistics,MTU in Solaris 10
dladm is the admin utility for Data-Link Interface which helps to display informarthe like Link Status (UP/DOWN), Speed, Duplex, MTU, VLAN Tagged and crucially statistics of network traffic on each of the interfaces historically as well as in real time. dladm can also configure and admin Link Aggregation on multiple NICs which we will not focus here.
Show Link Status/Speed/Duplex
# dladm show-dev nxge0 link: down speed: 0 Mbps duplex: unknown nxge1 link: down speed: 0 Mbps duplex: unknown nxge2 link: up speed: 1000 Mbps duplex: full nxge3 link: up speed: 1000 Mbps duplex: full
As you can see above the “show-dev†option lists all the network interfaces with Link Status (UP/DOWN), current speed in Mbps and Duplex (Half/Full)
Show Link Status
# dladm show-link nxge0 type: non-vlan mtu: 1500 device: nxge0 nxge1 type: non-vlan mtu: 1500 device: nxge1 nxge2 type: non-vlan mtu: 1500 device: nxge2 nxge3 type: non-vlan mtu: 1500 device: nxge3
Here “show-link†option reveals the MTU and the VLAN tagging detail on each of the interfaces on the system.
Show Stats of all Interfaces for all time
# dladm show-dev -s ipackets rbytes ierrors opackets obytes oerrors nxge0 0 0 0 0 0 0 nxge1 0 0 0 0 0 0 nxge2 179625752557169463759657 581104982 3964684165410 nxge3 22240891 1834257868 0 5198483 395084708 0
The “-s†option along with “show-dev†or “show-link†displays network traffic statistics including Input/Output packets, input/output errors.
Stats in real-time
To show the stats of a particular interface in real-time use the “-i†option which is the interval in seconds. The first line shows again historic stats and later on the real-time information for every “n†seconds (5 seconds in our example)
# dladm show-link -s -i 5 nxge2 ipackets rbytes ierrors opackets obytes oerrors nxge2 179637824757173944575957 581119516 3964706801670 ipackets rbytes ierrors opackets obytes oerrors nxge2 961 319105 0 150 17874 0 ipackets rbytes ierrors opackets obytes oerrors nxge2 887 263850 0 117 16505 0
If we fail to mention the interface then it takes the default interface (1st in the list). As you can see from the example below, we see stats for nxge0 which is not connected.
# dladm show-link -s -i 5 ipackets rbytes ierrors opackets obytes oerrors nxge0 0 0 0 0 0 0 ipackets rbytes ierrors opackets obytes oerrors nxge0 0 0 0 0 0 0
Latest posts by Editor (see all)
- How to Show files by size, biggest last- Linux Commands - January 21, 2011
- How to test for unreadable blocks on disk- Linux Commands - January 21, 2011
- How to Do a read speed test on disk sda – Linux Commands - January 21, 2011
