CA Links
Monday, July 30, 2012
Wednesday, April 11, 2012
Duplicate Devices List
Output:
Report in NPC, under Engineering menu called “Duplicate Device Names”

Input:
Both views are pointed to two files in D:\NetVoyant\Portal\Website directory, being generated by a duplicate_devices.bat batch file (in D:\MSO\scripts) with the following inside:
mysql --html –D nms2 –e “select dev_name as Hostname, count(*) as NumOccurrences from devices group by dev_name having NumOccurrences > 1” > D:\NetVoyant\Portal\Website\duplicatename.txt
mysql --html –D nms2 –e “select dev_alias as Hostname, count(*) as NumOccurrences from devices group by dev_alias having NumOccurrences > 1” > D:\NetVoyant\Portal\Website\duplicatealias.txt
The batch file is being called on a daily schedule by the periodic.bat file, which is used by NetVoyant to call other cleanup processes. The following line inside periodic.bat is the one that calls the batch script:
call D:\MSO\scripts\duplicate_devices.batAll Interfaces
This wouldn’t do any of that…..agents_all_view will only show you your licensed interfaces.
Select * from interfaces where lastflow > unix_timestamp()-86400 and enabled='N'
This would give you any where the interfaces are not enabled and lastflow has seen an update in the last 24 hours.
To get it to a text file:
Mysql –P 3308 reporter "Select * from interfaces where lastflow > unix_timestamp()-86400 and enabled='N' " > interfaces.txt
Mysql –P 3308 reporter "Select * from interfaces where lastflow > unix_timestamp()-86400 and enabled='N' " > interfaces.txt
Mysql -P 3308
select * From interfaces where lastflow> unix_timestamp()-86400 and enabled='N'
List of Inactive enabled interfaces in RA 9.0
From MSO Wiki
mysql -P 3308 reporterselect RouterName, Name, Enabled, from_unixtime(LastData) from agents_all_view where LastData < unix_timestamp()-86400 and enabled='Y' order by RouterName; > RAInterfaces.txt
mysql -P 3308 reporter select RouterName, Name, Enabled, from_unixtime(LastData) from agents_all_view; > RAInterfacestotal.txt