ethextractstat(8)

πŸ“¦ version 12.1.0.1, in centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

✨ 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/--output report option β€” not a typo, it just doesn't care πŸ’€.
    • -X/--infile snapshot_input β€” builds a report from the data sitting in the snapshot_input file. That snapshot_input must have been generated during a previous -o snapshot run, no shortcuts. And plot twist: you can use '-' as the snapshot_input to mean stdin.
    • -c/--config file β€” points at the error thresholds configuration file. Default is the /etc/eth-tools/ethmon.conf file.
    • -E/--eth config_file β€” points at the Ethernet management configuration file. Default is the /etc/eth-tools/mgt_config.xml file.
    • -p plane β€” 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 -F for the port error counters check (-o errors). Normally the neighbor of each selected port gets checked too. Does not affect other reports.
    • -F/--focus point β€” 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 (SW or NIC).
  • nodetype:value1:port:value2 β€” value1 is the node type (SW or NIC), value2 is the port number.
  • nodetype:value1:portid:value2 β€” value1 is the node type (SW or NIC), value2 is the port id.
  • rate:value β€” value is a string for rate (25g, 50g, 75g, 100g), and it 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 the MTU size (maximum size 65535), and it 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 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