Joe Clarke Mon, 09/15/2008 - 07:51
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Go to RME > Config Mgmt > Archive Mgmt > Search Archive. Then enter your pattern of "ip helper-address 10.32.2.2", and select all Normal devices in RME.

oalvi Tue, 09/16/2008 - 00:00
User Badges:

the below message is shown when i click search:

HTTP Status 500 - Internal Server Error


I select 3200 devices, version: all, view type: version


When I select 3200 devices, version: latest, view type: version, the message is:


No configs found for the specified search pattern.



note: i changed the Archive Location to different location


yjdabear Mon, 09/15/2008 - 11:19
User Badges:
  • Gold, 750 points or more

The following script can be easily adopted to list all the interfaces with a specific attribute:


#!/usr/bin/ksh

# search for interfaces with "ip helper-address 10.32.2.2" in RME archive


find /var/adm/CSCOpx/files/rme/dcma/devfiles -name RUNNING -type d |grep -v START |grep -v proc |grep -v VLAN |grep -v drw |grep -v total |grep -v "\/assoc" |grep -v "[PRIMARY|RUNNING]:" | sort -t "/" -n -k 2 | while read PATH;

do

NEWESTDIR=`/usr/bin/ls -1t $PATH | /usr/bin/head -1`

NEWESTDIRFULL="${PATH}/${NEWESTDIR}"

NEWESTCONFIG=`/usr/bin/ls -latr ${NEWESTDIRFULL} | /usr/bin/grep ^- | /usr/bin/tail -1 | /usr/bin/head -1 | /usr/bin/awk '{print $9}'`

NEWESTCONFIGFULL="${NEWESTDIRFULL}/${NEWESTCONFIG}"

HOSTNAME=`/usr/bin/cat ${NEWESTCONFIGFULL} | /usr/bin/grep -i hostname`

IPHELPER=`/usr/bin/nawk 'BEGIN{RS="!";FS="\n"}/ip helper-address 10.32.2.2/{print $2}' < ${NEWESTCONFIGFULL}`

echo ">>>${HOSTNAME}\n\n ${IPHELPER} \n\n ***end here***\n\n"

done


oalvi Tue, 09/16/2008 - 00:14
User Badges:

after running script, the result is not correct, some of devices hasn't "ip helper-address 10.32.2.2" at all and some of them print sh command as attached




Attachment: 
yjdabear Tue, 09/16/2008 - 18:49
User Badges:
  • Gold, 750 points or more

Could you post an example of an interface with this ip helper-address, with sensitive info xxx'ed out of course?

Actions

This Discussion