ethextractperf(8)
π
ethextractperf β the EFSFFCLIRG glow-up, bestie edition π
okay so. you know how you're drowning in fabric ports and you just want the numbers?? this is that. ethextractperf is your girl. she pulls a full per-port performance counter report and hands it to you as CSV β perfect for yeeting into a spreadsheet or letting your little scripts chew on it. π
how does she do it?? she generates a detailed ethreport component summary report, then pipes that into ethxmlextract and yanks out the element values for NodeDesc, Chassis ID, PortNum, and literally every performance counter. extraction only happens from the Systems portion of the report, which means no Neighbor info (the Neighbor portions get suppressed, sorry not sorry π).
also?? she's literally a sample script. use her as inspo for building your own custom per-port reports. main character behavior fr. β¨
π Syntax π
ethextractperf [ethreport options]
β¨ Options β¨
--helpβ spits out the full help text. classic.ethreport optionsβ these get passed straight through toethreport. the subset below is the "typical + useful" lil collection for this command. and heads up: by design, the tool ignores the-o/--outputreport option. π-X,--infilesnapshot_input β builds a report from the data sitting in the snapshot_input file. that file has to have been generated during a previous-o snapshotrun, no exceptions. and yes, you can pass-as snapshot_input to mean stdin. π«Ά-T,--topologytopology_input β uses the topology_input file to augment and verify fabric info. when you use it, various reports can get augmented with info that just isn't available electronically.-also works here to specify stdin.-E,--ethconfig_file β names the Ethernet management config file. default is the/etc/eth-tools/mgt_config.xmlfile. π§-pplane β names the enabled plane as defined in the Mgt config file. default is the first enabled plane.-F,--focuspoint β sets the focus area for the report, used to limit the report's scope. details live down in Point Syntax. β
πΈ Point Syntax πΈ
ifid:valueβ value is a numeric ifid.ifid:value:nodeβ value is a numeric ifid; selects the node with the given ifid.ifid:value:port:value2β value is the numeric ifid of a node, value2 is a port number.ifid:value:portid:value2β value is the numeric ifid of a node, value2 is a port id.mgmtifaddr:valueβ value is a numeric port mgmtifaddr.ifaddr:valueβ value is a numeric node ifaddr.ifaddr:value1:port:value2β value1 is a numeric node ifaddr, value2 is a port number.ifaddr:value1:portid:value2β value1 is a numeric node ifaddr, value2 is a port id.chassisid:valueβ value is a numeric chassisid.chassisid:value1:port:value2β value1 is a numeric chassisid, value2 is a port number.chassisid:value1:portid:value2β value1 is a numeric chassisid, value2 is a port id.node:valueβ value is a node description (node name).node:value1:port:value2β value1 is a node description (node name), value2 is a port number.node:value1:portid:value2β value1 is a node description (node name), value2 is a port id.nodepat:valueβ value is a glob pattern for node description (node name).nodepat:value1:port:value2β value1 is the glob pattern for the node description (node name), value2 is a port number.nodepat:value1:portid:value2β value1 is the glob pattern for the node description (node name), value2 is a port id.nodedetpat:valueβ value is a glob pattern for node details.nodedetpat:value1:port:value2β value1 is the glob pattern for the node details, value2 is a port number.nodedetpat:value1:portid:value2β value1 is the glob pattern for the node details, value2 is a port id.nodetype:valueβ value is a node type (SWorNIC).nodetype:value1:port:value2β value1 is a node type (SWorNIC), value2 is a port number.nodetype:value1:portid:value2β value1 is a node type (SWorNIC), value2 is a port id.rate:valueβ value is a string for rate (25g,50g,75g,100g); omits switch mgmt port 0. π«portstate:valueβ value is a string for state (up,down,testing,unknown,dormant,notactive).portphysstate:valueβ value is a string for PHYs state (other,unknown,operational,standby,shutdown,reset).mtucap:valueβ value is an MTU size (maximum size65535); omits switch mgmt port 0.linkdetpat:valueβ value is a glob pattern for link details.portdetpat:valueβ value is a glob pattern for port details.nodepatfile:FILENAMEβ names the file holding the list of nodepats or node descriptions.nodepairpatfile:FILENAMEβ names the file holding the list of node pairs, separated by a colon.ldrβ specifies the ports with a non-zero link down reason or neighbor link down reason.ldr:valueβ specifies the ports with a link down reason or neighbor link down reason equal to value.
the part of the script that calls ethreport and ethxmlextract goes a lil something like this, and honestly?? she ate:
ethreport -o comps -x -d 10 "$@" | /usr/sbin/ethxmlextract -d \; \
-e NodeDesc -e ChassisID -e PortNum -e PortId -e LinkSpeedActive \
-e IfHCOutOctetsMB -e IfHCOutOctets -e IfHCOutUcastPkts \
-e IfHCOutMulticastPkts -e IfHCInOctetsMB -e IfHCInOctets \
-e IfHCInUcastPkts -e IfHCInMulticastPkts \
-e Dot3HCStatsInternalMacTransmitErrors \
-e Dot3HCStatsInternalMacReceiveErrors -e Dot3HCStatsSymbolErrors \
-e IfOutErrors -e IfInErrors -e IfInUnknownProtos \
-e Dot3HCStatsAlignmentErrors -e Dot3HCStatsFCSErrors \
-e Dot3HCStatsFrameTooLongs -e IfOutDiscards -e IfInDiscards \
-e Dot3StatsCarrierSenseErrors -e Dot3StatsSingleCollisionFrames \
-e Dot3StatsMultipleCollisionFrames -e Dot3StatsSQETestErrors \
-e Dot3StatsDeferredTransmissions -e Dot3StatsLateCollisions \
-e Dot3StatsExcessiveCollisions -s Neighbor
π Example π
ethextractperf
that's it. that's the whole vibe. run her, get your CSV, go be iconic. π
π Copyright(C) 2020-2024 Intel Corporation β no cap, that's the whole copyright line, and this gorgeous page isethextractperf(8)from theEFSFFCLIRGman page era. ty for coming to my TED talk, bestie, now go extract some perf counters πβ¨
π¦ where this page comes from
- centos-stream 9: eth-tools-fastfabric 1:12.1.0.0-4.el9 Β· BSD
- fedora 43: eth-tools-fastfabric 1:12.1.0.0-151.fc43 Β· BSD-3-Clause
- fedora 44: eth-tools-fastfabric 1:12.1.0.1-6.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: eth-fastfabric 11.7.0.0-160000.2.2 Β· BSD-3-Clause OR GPL-2.0-only
- Copyright 2020-2024, Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms