04-23-2007 08:41 AM
Is there a way to filter the output of the "sh port" (Cat) or "sh int" (ios) command so that I only get certain fields? There doesn't seem to be a "|incl" option for these commands. Is there another way? I want to see port, name, duplex, speed, align-err, fcs-err, and runts. We suspect mismatches on speed/duplex settings and want to reset counters, wait a day, then get this output on three 6509 switches (two cat-based, one ios-based). Any help would be appreciated. Thank you.
04-23-2007 08:58 AM
If you have recent enough versions of CatOS and IOS, you have the ability to use TCL to code filters for the show port/show int commands. CatOS 8.x and IOS 12.2(18)SXF5 and higher give you this capability. See http://www.cisco.com/en/US/products/sw/iosswrel/ps5207/products_feature_guide09186a00801a75a7.html for more info on TCL in IOS. CatOS's TCL is not nearly as powerful, but it should be sufficient for filtering show port output. See http://www.cisco.com/en/US/products/hw/switches/ps708/products_configuration_guide_chapter09186a008019eff0.html#wp1038944 for tips on using TCL on CatOS.
04-24-2007 07:02 AM
Using LMS and especially RME 4.0.5 I have used the NetShow functionality to do this.
Go NetShow>NetShow Jobs>Create
and then in the Custom Commands box, enter the command
sh port | include xxxx
where xxxx is the part you wish to filter on.
Its not perfect but it works.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide