[rancid] Re: Searching for Half-duplex Interfaces

john heasley heas at shrubbery.net
Fri Jan 11 21:29:39 UTC 2008

Fri, Jan 11, 2008 at 01:31:47PM -0700, Pabon, Nestor:
> First of all I want to thank the developers for such a great tool.
> I need to discover in a network of 200+ routers, which ones have
> FastEthernet interfaces; either 0/0 or 0/1 set to "Half-duplex".
> Can someone help me script this query?

an snmpwalk of interfaces seems like a better approach.  however...

for rtr in ...list...; do
	clogin -c 'show interfaces | in (line protocol|duplex|speed)' $rtr \
		>>output 2>&1

or xargs or whatever your fancy.  then perl/awk/human/whatever you like to
exclude the uninteresting stuff from the output.

More information about the Rancid-discuss mailing list