ethextractstat(8)
β¨ NAME β¨
okay bestie, meet ethextractstat(8) β part of the EFSFFCLIRG manual, and no cap it's a whole vibe π
ethextractstat does an error analysis of a fabric, and it serves up augmented info straight from a topology_file. The report it hands you? Cable information included, periodt.
So here's the tea: ethextractstat generates a detailed ethreport errors report that also has a topology file attached (go peek at ethreport for the whole lore on topology files, iykyk). Then that report gets piped into ethxmlextract, which pulls out the values for Link, Cable and Port. Quick heads up though β those port element names are context-sensitive, so don't get it twisted π. And listen: ethxmlextract spits out two extraction records for every single link (one per port on that link), so ethextractstat does the merge β it fuses those two records into one and yeets the redundant link and cable info. Honestly? This script can be your blueprint for making custom reports. Main character energy fr fr π
Under the hood ethextractstat has a while read loop that reads the CSV line-by-line, uses cut to strip the redundant stuff, and drops the data out on a common line. Slay.
π¦ Syntax
ethextractstat topology_file [ethreport options]
π Options
--helpβ spills the full help text, every word of it.topology_fileβ tells it which topology_file to use. Pick one, bestie.- ethreport options β the following options get passed along to
ethreport. This subset is considered typical and useful for this command. And by design, the tool ignores the-o/--outputreport option β not a typo, it just doesn't care π.-X/--infilesnapshot_input β builds a report from the data sitting in the snapshot_input file. That snapshot_input must have been generated during a previous-o snapshotrun, no shortcuts. And plot twist: you can use'-'as the snapshot_input to mean stdin.-c/--configfile β points at the error thresholds configuration file. Default is the/etc/eth-tools/ethmon.conffile.-E/--ethconfig_file β points at the Ethernet management configuration file. Default is the/etc/eth-tools/mgt_config.xmlfile.-pplane β names the enabled plane defined in the Mgt config file. Default is the first enabled plane.-L/--limitβ limits operation to the exact specified focus with-Ffor the port error counters check (-o errors). Normally the neighbor of each selected port gets checked too. Does not affect other reports.-F/--focuspoint β sets the focus area for the report. Use it to limit the scope of the report. Peep Point Syntax below for the details.
π Point Syntax
All the ways you can point at a thing, bestie:
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 the node, value2 is the port number.ifid:value:portid:value2β value is the numeric ifid of the node, value2 is the port id.mgmtifaddr:valueβ value is a numeric port mgmtifaddr.ifaddr:valueβ value is a numeric node ifaddr.ifaddr:value1:port:value2β value1 is the numeric node ifaddr, value2 is the port number.ifaddr:value1:portid:value2β value1 is the numeric node ifaddr, value2 is the port id.chassisid:valueβ value is a numeric chassisid.chassisid:value1:port:value2β value1 is a numeric chassisid, value2 is the port number.chassisid:value1:portid:value2β value1 is a numeric chassisid, value2 is the port id.node:valueβ value is a node description (node name).node:value1:port:value2β value1 is a node description (node name), value2 is the port number.node:value1:portid:value2β value1 is a node description (node name), value2 is the port id.nodepat:valueβ value is a glob pattern for the node description (node name).nodepat:value1:port:value2β value1 is the glob pattern for the node description (node name), value2 is the port number.nodepat:value1:portid:value2β value1 is the glob pattern for the node description (node name), value2 is the 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 the port number.nodedetpat:value1:portid:value2β value1 is the glob pattern for the node details, value2 is the port id.nodetype:valueβ value is the node type (SWorNIC).nodetype:value1:port:value2β value1 is the node type (SWorNIC), value2 is the port number.nodetype:value1:portid:value2β value1 is the node type (SWorNIC), value2 is the port id.rate:valueβ value is a string for rate (25g,50g,75g,100g), and it omits switch mgmt port0.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 the MTU size (maximum size65535), and it omits switch mgmt port0.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 that holds the list of nodepats or node descriptions.nodepairpatfile:FILENAMEβ names the file that holds 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.
And here's the chunk of the script that calls ethreport and ethxmlextract, in all its glory:
ethreport -x -Q -d 10 -o errors -T "$@" | ethxmlextract -H -d \; \
-e Link:id -e Rate -e LinkDetails -e CableLength -e CableLabel \
-e CableDetails -e Port.NodeDesc -e Port.PortNum -e Port.PortId
π Examples
Like, actual receipts β¨
ethextractstat topology_file
ethextractstat topology_file -c my_ethmon.conf
Copyright(C) 2020-2024 Intel Corporation β and that's the whole page for ethextractstat(8), straight out of the EFSFFCLIRG man page set π«Ά go forth and extract, bestie ππ
π¦ 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