ethextractbadlinks(8)
β¨ ethextractbadlinks β¨
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/--infilesnapshot_input β generates a report using the data in the snapshot_input file. heads up: snapshot_input must have been generated during a previous-o snapshotrun. and yes,'-'can be used as the snapshot_input to specify stdin β¨-T/--topologytopology_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/--configfile β specifies the error thresholds configuration file. default is the/etc/eth-tools/ethmon.conffile.-E/--ethconfig_file β specifies the Ethernet management configuration file. default is the/etc/eth-tools/mgt_config.xmlfile.-pplane β 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-Ffor port error counters check (-o errors). normally the neighbor of each selected port is also checked. does not affect other reports.-F/--focuspoint β 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 (SWorNIC).nodetype:value1:port:value2β value1 is node type (SWorNIC), value2 is port number.nodetype:value1:portid:value2β value1 is node type (SWorNIC), 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 size65535), 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
- 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