Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

generate report _IOS command

How I can generate report for the interfaces/devices that contain:

ip helper-address 10.32.2.2

from ciscoworks 2.6 with RME 4.0.5

5 REPLIES
Cisco Employee

Re: generate report _IOS command

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.

New Member

Re: generate report _IOS command

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

Blue

Re: generate report _IOS command

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

New Member

Re: generate report _IOS command

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

Blue

Re: generate report _IOS command

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

109
Views
0
Helpful
5
Replies
CreatePlease to create content