ethextractbadlinks(8)

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

okay bestie, gather round, because this little script is genuinely iconic and you're gonna love it πŸ’–

ethextractbadlinks is the tool that produces a CSV file listing all β€” or some β€” of the links that exceed the ethreport -o error thresholds. think of it as the bouncer that only lets the problematic links into the club πŸ’…

it's basically a front end to the ethreport tool, and the output? chef's kiss. you can import it straight into a spreadsheet or hand it off to other scripts to be parsed. and if you wanna build your own custom per-link reports, this script is literally a whole sample for that. main character energy, fr fr ✨


🌸 Syntax 🌸

ethextractbadlinks [ethreport  options]

πŸŽ€ Options πŸŽ€

  • --help β€” produces the full help text. no cap, it tells you everything.

πŸ’œ ethreport options

so here's the vibe: the following options get passed along to ethreport. this subset is the stuff considered typical and useful for this command. and by design, the tool ignores the -o/--output report option. not me being picky, that's just the rules 🫢

  • -X/--infile snapshot_input β€” generates a report using the data in the snapshot_input file. heads up: snapshot_input must have been generated during a previous -o snapshot run. and yes, '-' can be used as the snapshot_input to specify stdin ✨
  • -T/--topology topology_input β€” uses the topology_input file to augment and verify fabric information. when you use it, various reports can be augmented with info that isn't available electronically. '-' may be used to specify stdin.
  • -c/--config file β€” specifies the error thresholds configuration file. default is the /etc/eth-tools/ethmon.conf file.
  • -E/--eth config_file β€” specifies the Ethernet management configuration file. default is the /etc/eth-tools/mgt_config.xml file.
  • -p plane β€” name of 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 port error counters check (-o errors). normally the neighbor of each selected port is also checked. does not affect other reports.
  • -F/--focus point β€” specifies the focus area for the report. used to limit the scope of the report. refer to Point Syntax for the details πŸ‘‘

πŸ¦‹ Point Syntax πŸ¦‹

okay this is the part where it gets detailed, but stay with me, it's giving very organized 🌈

  • ifid:value β€” value is numeric ifid.
  • ifid:value:node β€” value is numeric ifid, selects node with given ifid.
  • ifid:value:port:value2 β€” value is numeric ifid of node, value2 is port number.
  • ifid:value:portid:value2 β€” value is numeric ifid of node, value2 is port id.
  • mgmtifaddr:value β€” value is numeric port mgmtifaddr.
  • ifaddr:value β€” value is numeric node ifaddr.
  • ifaddr:value1:port:value2 β€” value1 is numeric node ifaddr, value2 is port number.
  • ifaddr:value1:portid:value2 β€” value1 is numeric node ifaddr, value2 is port id.
  • chassisid:value β€” value is numeric chassisid.
  • chassisid:value1:port:value2 β€” value1 is numeric chassisid, value2 is port number.
  • chassisid:value1:portid:value2 β€” value1 is numeric chassisid, value2 is port id.
  • node:value β€” value is node description (node name).
  • node:value1:port:value2 β€” value1 is node description (node name), value2 is port number.
  • node:value1:portid:value2 β€” value1 is node description (node name), value2 is port id.
  • nodepat:value β€” value is glob pattern for node description (node name).
  • nodepat:value1:port:value2 β€” value1 is the glob pattern for the node description (node name), value2 is port number.
  • nodepat:value1:portid:value2 β€” value1 is the glob pattern for the node description (node name), value2 is port id.
  • nodedetpat:value β€” value is glob pattern for node details.
  • nodedetpat:value1:port:value2 β€” value1 is the glob pattern for the node details, value2 is port number.
  • nodedetpat:value1:portid:value2 β€” value1 is the glob pattern for the node details, value2 is port id.
  • nodetype:value β€” value is node type (SW or NIC).
  • nodetype:value1:port:value2 β€” value1 is node type (SW or NIC), value2 is port number.
  • nodetype:value1:portid:value2 β€” value1 is node type (SW or NIC), value2 is port id.
  • rate:value β€” value is 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 MTU size (maximum size 65535), omits switch mgmt port 0.
  • linkdetpat:value β€” value is glob pattern for link details.
  • portdetpat:value β€” value is glob pattern for port details.
  • nodepatfile:FILENAME β€” specifies the name of file with the list of nodepats or node descriptions.
  • nodepairpatfile:FILENAME β€” specifies the name of file with 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.

⭐ Examples ⭐

here's the tea, actual commands, copy-paste ready πŸ’…

list all the bad links in the fabric:

ethextractbadlinks

list all the bad links to a switch named "coresw1":

ethextractbadlinks -F "node:coresw1"

list all the bad links to end-nodes:

ethextractbadlinks -F "nodetype:NIC"

🫢 quick reminder bestie: every flag, every value, every default up there is doing real work. don't skip the boring-looking ones, they're the ones that save you at 3am 😭

and that's the whole page, babes 🌸 this manual is Copyright(C) 2020-2024 Intel Corporation, coming at you from the EFSFFCLIRG man page set. go forth and find those bad links, you absolute icon πŸ‘‘βœ¨πŸ’–

πŸ“¦ where this page comes from