Orphaned interface models in the CA Spectrum database

Document ID : KB000030129
Last Modified Date : 28/11/2018
Show Technical Document Details
Issue:

CA Spectrum is generating alarms on interface models whose parent device model has been deleted from the database 

Cause:

These orphaned models could be the result of either of the following: 

1. Database corruption 

2. The delete did not complete when the device model was deleted. 

Resolution:

These orphaned interface models will not have a HASPART association to a device model. The following Command Line Interface (CLI) commands can be used to identify these orphaned interface models for deletion. Please reference the "Command Line Interface User Guide" for more information on using CLI.

1. Run the following CLI command on the SpectroSERVER system where these orphaned models are located to create a list of model handles for all interface models:

./seek attr=0x11ee8,val=15 | grep -v MTypeName | awk '{ print $1 }' > interface_models

2. The following script reads in the interface_models file created from the seek command above, checks the associations and if blank, adds the model handle of that interface to the interface.out file. 

 

#!/bin/sh 

rm interface.out 

./connect 

for i in `cat interface_models` 

do 

./show associations mh=$i | grep -v LMHandle | awk '{ print $1 }' > out 

ASSOC=`cat out` 

if [ "$ASSOC" = "" ] 

then 

echo $i >> interface.out 

fi 

done 

./disconnect

 

Depending on the number of interface models in the database, the above script can take a while to run. When complete, the interface.out file will contain a list of interface model handles for the orphaned interfaces. From here, you can verify and delete these models.