[rancid] Re: Searching for Half-duplex Interfaces

Pabon, Nestor NPabon at archstonesmith.com
Fri Jan 11 22:02:22 UTC 2008

This looks interesting.

Got to figure out how to script it. 

-----Original Message-----
From: john heasley [mailto:heas at shrubbery.net] 
Sent: Friday, January 11, 2008 2:30 PM
To: Pabon, Nestor
Cc: rancid-discuss at shrubbery.net
Subject: Re: [rancid] Searching for Half-duplex Interfaces

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
exclude the uninteresting stuff from the output.

More information about the Rancid-discuss mailing list