Show all interfaces and SFP transceiver information

Hey,

is there a way to show all interfaces and their SFP transceiver information at once via cli?
For example like “show interface status” on Cisco devices. Something like:
sfp-sfpplus1 → S-RJ01
sfp-sfpplus2 → S-85DLC05D
and so on

Greetings!

You mean “Show all SFP interfaces and, if present, the module information”?

/interface ethernet
{
    :local iflist [find where default-name~"(sfp|combo)"]
    :foreach if in=$iflist do={
        :local ifname     [get $if name]
        :local nicename   [:pick "$ifname          " 0 13]
        :local ifmon      [monitor $ifname once as-value]
        :local sfppresent ($ifmon->"sfp-module-present")
        :local sfpmodel   ($ifmon->"sfp-vendor-part-number")
        :if ($sfppresent = true) do={:put "$nicename --> $sfpmodel"} else={:put "$nicename --> <empty>" }
    }
}

I had a simple command in mind :wink: , but that script will do it also :sunglasses:
Thanks!

modified previous script for include combo sfp/ether and align names