mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
cli: tighten 'show interface' detail-view alignment
The Ethernet packet/RMON counters at the bottom of 'show interface <name>' were appended with a wider label column than the operational data above them, breaking visual alignment. Group them under an "Ethernet Statistics" section heading (Decore.title), same convention as 'Available Networks' in the wifi scan view. Narrow the operational-data label column from 20 to 19 chars so the title bar exactly matches the heading text — a tighter and more deliberately aligned look. All labels in pr_iface fit within 19 chars except 'lacp system priority' (20); rename it to 'lacp sys priority' for consistency with the other 'lacp ...' labels (lacp aggregate id, lacp partner mac, ...) so the new field width works universally. Refresh CLI snapshots and doc samples to match. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+51
-50
@@ -42,34 +42,34 @@ The detail view spells everything out, including auto-negotiation
|
||||
state and the speed in Mbit/s.
|
||||
|
||||
<pre class="cli"><code>admin@example:/> <b>show interface eth1</b>
|
||||
name : eth1
|
||||
index : 2
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
link mode : 1000baseT
|
||||
auto-negotiation : on
|
||||
duplex : full
|
||||
speed : 1000
|
||||
physical address : 00:53:00:06:11:01
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 75581
|
||||
out-octets : 43130
|
||||
name : eth1
|
||||
index : 2
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
link mode : 1000baseT
|
||||
auto-negotiation : on
|
||||
duplex : full
|
||||
speed : 1000
|
||||
physical address : 00:53:00:06:11:01
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 75581
|
||||
out-octets : 43130
|
||||
...
|
||||
admin@example:/> <b>show interface eth4</b>
|
||||
name : eth4
|
||||
index : 5
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
link mode : 100baseTX
|
||||
auto-negotiation : on
|
||||
duplex : full
|
||||
speed : 100
|
||||
physical address : 00:53:00:06:11:04
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 75439
|
||||
out-octets : 550704
|
||||
name : eth4
|
||||
index : 5
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
link mode : 100baseTX
|
||||
auto-negotiation : on
|
||||
duplex : full
|
||||
speed : 100
|
||||
physical address : 00:53:00:06:11:04
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 75439
|
||||
out-octets : 550704
|
||||
...
|
||||
admin@example:/>
|
||||
</code></pre>
|
||||
@@ -200,30 +200,31 @@ speed : 10000
|
||||
Ethernet packet statistics[^1] can be listed as shown below.
|
||||
|
||||
<pre class="cli"><code>admin@example:/> <b>show interface eth1</b>
|
||||
name : eth1
|
||||
index : 2
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
link mode : 1000baseT
|
||||
auto-negotiation : on
|
||||
duplex : full
|
||||
speed : 1000
|
||||
physical address : 00:53:00:06:11:0a
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 75581
|
||||
out-octets : 43130
|
||||
|
||||
eth-in-frames : 434
|
||||
eth-in-multicast-frames : 296
|
||||
eth-in-broadcast-frames : 138
|
||||
eth-in-error-fcs-frames : 0
|
||||
eth-in-error-oversize-frames : 0
|
||||
eth-out-frames : 310
|
||||
eth-out-multicast-frames : 310
|
||||
eth-out-broadcast-frames : 0
|
||||
eth-out-good-octets : 76821
|
||||
eth-in-good-octets : 60598
|
||||
name : eth1
|
||||
index : 2
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
link mode : 1000baseT
|
||||
auto-negotiation : on
|
||||
duplex : full
|
||||
speed : 1000
|
||||
physical address : 00:53:00:06:11:0a
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 75581
|
||||
out-octets : 43130
|
||||
───────────────────
|
||||
<b>Ethernet Statistics</b>
|
||||
in-frames : 434
|
||||
in-multicast-frames : 296
|
||||
in-broadcast-frames : 138
|
||||
in-error-fcs-frames : 0
|
||||
in-error-oversize-frames : 0
|
||||
out-frames : 310
|
||||
out-multicast-frames : 310
|
||||
out-broadcast-frames : 0
|
||||
out-good-octets : 76821
|
||||
in-good-octets : 60598
|
||||
admin@example:/>
|
||||
</code></pre>
|
||||
|
||||
|
||||
+3
-3
@@ -90,9 +90,9 @@ The description is visible in the operational datastore and in `show`
|
||||
commands:
|
||||
|
||||
<pre class="cli"><code>admin@example:/> <b>show interface eth0</b>
|
||||
name : eth0
|
||||
description : Uplink to core switch
|
||||
index : 2
|
||||
name : eth0
|
||||
description : Uplink to core switch
|
||||
index : 2
|
||||
...
|
||||
</code></pre>
|
||||
|
||||
|
||||
+48
-48
@@ -124,45 +124,45 @@ In addition to basic status shown in the interface overview, detailed
|
||||
LAG status can be inspected:
|
||||
|
||||
<pre class="cli"><code>admin@example:/> <b>show interface lag0</b>
|
||||
name : lag0
|
||||
index : 25
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
physical address : 00:a0:85:00:02:00
|
||||
lag mode : static
|
||||
lag type : balance-xor
|
||||
lag hash : layer2
|
||||
link debounce up : 0 msec
|
||||
link debounce down : 0 msec
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 0
|
||||
out-octets : 2142
|
||||
name : lag0
|
||||
index : 25
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
physical address : 00:a0:85:00:02:00
|
||||
lag mode : static
|
||||
lag type : balance-xor
|
||||
lag hash : layer2
|
||||
link debounce up : 0 msec
|
||||
link debounce down : 0 msec
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 0
|
||||
out-octets : 2142
|
||||
</code></pre>
|
||||
|
||||
Same aggregate, but in LACP mode:
|
||||
|
||||
<pre class="cli"><code>admin@example:/> <b>show interface lag0</b>
|
||||
name : lag0
|
||||
index : 24
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
physical address : 00:a0:85:00:02:00
|
||||
lag mode : lacp
|
||||
lag hash : layer2
|
||||
lacp mode : active
|
||||
lacp rate : fast (1s)
|
||||
lacp aggregate id : 1
|
||||
name : lag0
|
||||
index : 24
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
physical address : 00:a0:85:00:02:00
|
||||
lag mode : lacp
|
||||
lag hash : layer2
|
||||
lacp mode : active
|
||||
lacp rate : fast (1s)
|
||||
lacp aggregate id : 1
|
||||
lacp system priority: 65535
|
||||
lacp actor key : 9
|
||||
lacp partner key : 9
|
||||
lacp partner mac : 00:a0:85:00:03:00
|
||||
link debounce up : 0 msec
|
||||
link debounce down : 0 msec
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 100892
|
||||
out-octets : 111776
|
||||
lacp actor key : 9
|
||||
lacp partner key : 9
|
||||
lacp partner mac : 00:a0:85:00:03:00
|
||||
link debounce up : 0 msec
|
||||
link debounce down : 0 msec
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 100892
|
||||
out-octets : 111776
|
||||
</code></pre>
|
||||
|
||||
Member ports provide additional status information:
|
||||
@@ -184,21 +184,21 @@ Member ports provide additional status information:
|
||||
Example member port status:
|
||||
|
||||
<pre class="cli"><code>admin@example:/> <b>show interface eth7</b>
|
||||
name : eth7
|
||||
index : 8
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
physical address : 00:a0:85:00:02:00
|
||||
lag member : lag0
|
||||
lag member state : active
|
||||
lacp aggregate id : 1
|
||||
lacp actor state : active, short_timeout, aggregating, in_sync, collecting, distributing
|
||||
lacp partner state : active, short_timeout, aggregating, in_sync, collecting, distributing
|
||||
link failure count : 0
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 473244
|
||||
out-octets : 499037
|
||||
name : eth7
|
||||
index : 8
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
physical address : 00:a0:85:00:02:00
|
||||
lag member : lag0
|
||||
lag member state : active
|
||||
lacp aggregate id : 1
|
||||
lacp actor state : active, short_timeout, aggregating, in_sync, collecting, distributing
|
||||
lacp partner state : active, short_timeout, aggregating, in_sync, collecting, distributing
|
||||
link failure count : 0
|
||||
ipv4 addresses :
|
||||
ipv6 addresses :
|
||||
in-octets : 473244
|
||||
out-octets : 499037
|
||||
</code></pre>
|
||||
|
||||
|
||||
|
||||
@@ -351,11 +351,11 @@ wg0 wireguard UP 2 peers (1 up)
|
||||
ipv6 fd00::1/64 (static)
|
||||
|
||||
admin@example:/> <b>show interface wg0</b>
|
||||
name : wg0
|
||||
type : wireguard
|
||||
index : 12
|
||||
operational status : up
|
||||
peers : 2
|
||||
name : wg0
|
||||
type : wireguard
|
||||
index : 12
|
||||
operational status : up
|
||||
peers : 2
|
||||
|
||||
Peer 1:
|
||||
status : UP
|
||||
|
||||
+23
-23
@@ -223,22 +223,22 @@ access-point).
|
||||
Use `show interface` to see discovered networks and their signal strength:
|
||||
|
||||
<pre class="cli"><code>admin@example:/> <b>show interface wifi0</b>
|
||||
name : wifi0
|
||||
type : wifi
|
||||
index : 3
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
ip forwarding : enabled
|
||||
physical address : f0:09:0d:36:5f:86
|
||||
ipv4 addresses : 192.168.1.100/24 (dhcp)
|
||||
ipv6 addresses :
|
||||
in-octets : 148388
|
||||
out-octets : 24555
|
||||
mode : station
|
||||
ssid : MyNetwork
|
||||
signal : -45 dBm (good)
|
||||
rx bitrate : 72.2 Mbps
|
||||
tx bitrate : 86.6 Mbps
|
||||
name : wifi0
|
||||
type : wifi
|
||||
index : 3
|
||||
mtu : 1500
|
||||
operational status : up
|
||||
ip forwarding : enabled
|
||||
physical address : f0:09:0d:36:5f:86
|
||||
ipv4 addresses : 192.168.1.100/24 (dhcp)
|
||||
ipv6 addresses :
|
||||
in-octets : 148388
|
||||
out-octets : 24555
|
||||
mode : station
|
||||
ssid : MyNetwork
|
||||
signal : -45 dBm (good)
|
||||
rx bitrate : 72.2 Mbps
|
||||
tx bitrate : 86.6 Mbps
|
||||
──────────────────────────────────────────────────────────────────────
|
||||
<span class="title">Available Networks</span>
|
||||
<span class="header">SSID BSSID SECURITY SIGNAL CHANNEL</span>
|
||||
@@ -304,13 +304,13 @@ admin@example:/config/interface/wifi0/> <b>leave</b>
|
||||
The connection attempt will start immediately. You can verify the connection status:
|
||||
|
||||
<pre class="cli"><code>admin@example:/> <b>show interface wifi0</b>
|
||||
name : wifi0
|
||||
type : wifi
|
||||
operational status : up
|
||||
physical address : f0:09:0d:36:5f:86
|
||||
mode : station
|
||||
ssid : MyHomeNetwork
|
||||
signal : -52 dBm (good)
|
||||
name : wifi0
|
||||
type : wifi
|
||||
operational status : up
|
||||
physical address : f0:09:0d:36:5f:86
|
||||
mode : station
|
||||
ssid : MyHomeNetwork
|
||||
signal : -52 dBm (good)
|
||||
</code></pre>
|
||||
|
||||
**Station configuration parameters:**
|
||||
|
||||
Reference in New Issue
Block a user