Skip to content

Instantly share code, notes, and snippets.

@Smithx10
Last active March 13, 2023 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Smithx10/95cb6a0851b58085e8da0d9ef808b071 to your computer and use it in GitHub Desktop.
Save Smithx10/95cb6a0851b58085e8da0d9ef808b071 to your computer and use it in GitHub Desktop.
[root@3c-ec-ef-d8-17-ca (us-east-2) ~]# dtrace -n 'mlxcx_cmd_query_port_speed:entry {self->mlp = args[1];} mlxcx_cmd_query_port_speed:return { stack(); printf("Returns %d: max_proto 0x%x, admin_proto 0x%x, oper_proto 0x%x\n", arg1, self->mlp->mlp_max_proto, self->mlp->mlp_admin_proto, self->mlp->mlp_oper_proto);}'
dtrace: description 'mlxcx_cmd_query_port_speed:entry ' matched 2 probes
CPU ID FUNCTION:NAME
14 69472 mlxcx_cmd_query_port_speed:return
mlxcx`mlxcx_update_link_state+0x2d
mlxcx`mlxcx_link_state_task+0x4c
genunix`taskq_thread+0x2ee
unix`thread_start+0xb
Returns 1: max_proto 0xf8f5f0d3, admin_proto 0xf8f5f0d3, oper_proto 0x0
14 69472 mlxcx_cmd_query_port_speed:return
mlxcx`mlxcx_update_link_state+0x2d
mlxcx`mlxcx_link_state_task+0x4c
genunix`taskq_thread+0x2ee
unix`thread_start+0xb
Returns 1: max_proto 0xf8f5f0d3, admin_proto 0xf8f5f0d3, oper_proto 0x0
[root@3c-ec-ef-d8-17-ca (us-east-2) ~]# dtrace -n 'mlxcx_cmd_query_port_speed:return { stack(); printf("Returns %d\n", arg1);}'
dtrace: description 'mlxcx_cmd_query_port_speed:return ' matched 1 probe
CPU ID FUNCTION:NAME
14 69472 mlxcx_cmd_query_port_speed:return
mlxcx`mlxcx_update_link_state+0x2d
mlxcx`mlxcx_link_state_task+0x4c
genunix`taskq_thread+0x2ee
unix`thread_start+0xb
Returns 1
14 69472 mlxcx_cmd_query_port_speed:return
mlxcx`mlxcx_update_link_state+0x2d
mlxcx`mlxcx_link_state_task+0x4c
genunix`taskq_thread+0x2ee
unix`thread_start+0xb
Returns 1
[root@3c-ec-ef-d8-17-ca (us-east-2) ~]# dtrace -n 'mlxcx_speed_to_bits:entry { stack(); printf ("arg is 0x%lx\n", arg0); }'
dtrace: description 'mlxcx_speed_to_bits:entry ' matched 1 probe
CPU ID FUNCTION:NAME
0 69361 mlxcx_speed_to_bits:entry
mlxcx`mlxcx_mac_stat+0x63
mac`mac_stat_get+0x4a
dls`dls_stat_update+0x33
dls`dls_devnet_stat_update+0x7b
kstat`read_kstat_data+0xbf
kstat`kstat_ioctl+0x73
genunix`cdev_ioctl+0x3f
specfs`spec_ioctl+0x55
genunix`fop_ioctl+0x40
genunix`ioctl+0x144
unix`sys_syscall32+0x242
arg is 0x0
cumulus@storage1:mgmt:~$ nv show interface swp3s0 link
operational applied description
--------------------- ----------------- ------- ----------------------------------------------------------------------
auto-negotiate on on Link speed and characteristic auto negotiation
breakout 1x sub-divide or disable ports (only valid on plug interfaces)
duplex full full Link duplex
fec auto auto Link forward error correction mechanism
mtu 9216 9216 interface mtu
speed 100G auto Link speed
dot1x
mab off bypass MAC authentication
parking-vlan off VLAN for unauthorized MAC addresses
state up up The state of the interface
stats
carrier-transitions 32 Number of times the interface state has transitioned between up and...
in-bytes 38798 B total number of bytes received on the interface
in-drops 222 number of received packets dropped
in-errors 0 number of received packets with errors
in-pkts 402 total number of packets received on the interface
out-bytes 10771161 B total number of bytes transmitted out of the interface
out-drops 0 The number of outbound packets that were chosen to be discarded eve...
out-errors 0 The number of outbound packets that could not be transmitted becaus...
out-pkts 118561 total number of packets transmitted out of the interface
mac 7c:c2:55:00:67:68 MAC Address on an interface
cumulus@storage1:mgmt:~$ nv show interface bond3s0 link
operational applied description
--------------------- ----------------- ------- ----------------------------------------------------------------------
auto-negotiate off on Link speed and characteristic auto negotiation
duplex full full Link duplex
fec auto Link forward error correction mechanism
mtu 9216 9216 interface mtu
speed 100G auto Link speed
dot1x
mab off bypass MAC authentication
parking-vlan off VLAN for unauthorized MAC addresses
state up up The state of the interface
stats
carrier-transitions 9 Number of times the interface state has transitioned between up and...
in-bytes 33482 B total number of bytes received on the interface
in-drops 222 number of received packets dropped
in-errors 0 number of received packets with errors
in-pkts 390 total number of packets received on the interface
out-bytes 9188090 B total number of bytes transmitted out of the interface
out-drops 0 The number of outbound packets that were chosen to be discarded eve...
out-errors 0 The number of outbound packets that could not be transmitted becaus...
out-pkts 112360 total number of packets transmitted out of the interface
mac 7c:c2:55:00:67:68 MAC Address on an interface
0 69361 mlxcx_speed_to_bits:entry
mlxcx`mlxcx_mac_stat+0x63
mac`mac_stat_get+0x4a
dls`dls_stat_update+0x33
dls`dls_devnet_stat_update+0x7b
kstat`read_kstat_data+0xbf
kstat`kstat_ioctl+0x73
genunix`cdev_ioctl+0x3f
specfs`spec_ioctl+0x55
genunix`fop_ioctl+0x40
genunix`ioctl+0x144
unix`sys_syscall32+0x242
arg is 0x0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment