Export Pending List from EMC IONIX

You have a list of new devices sitting in the queue to discover that never seems to change. Why not? Are the devices configured correctly? Did SMARTS\IONIX have problems during discovery?

Here is how to export the device list along with various other information to troubleshoot discovery problems or tell sys admins which devices they need to fix.

"<InCharge Home>/IP/smarts/bin/dmctl -s <DOMAIN_NAME> invoke AD_Pending::AD-Pending getPending"

Linux:
Typical AM-PM install in /opt/Incharge with a DOMAIN named INCHARGE-AM-PM:
"/opt/InCharge/IP/smarts/bin/dmctl -s INCHARGE-AM-PM invoke AD_Pending::AD-Pending getPending"

Windows:
Typical AM-PM install in C:\InCharge with a DOMAIN named INCHARGE-AM-PM:
"C:\InCharge\IP\smarts\bin\dmctl -s INCHARGE-AM-PM invoke AD_Pending::AD-Pending getPending"

This export looks pretty ugly, so I recommend cleaning it up with Perl before usage. The following code will put the output into tab delimited format which can be easily manipulated in calc or excel. You will need to change <IP_HOME> to suite your needs, and modify the print OUT lines to match up the column headers if you want to clean it up.

@pending = `<IP HOME>\\smarts\\bin\\dmctl -s INCHARGE-AM-PM invoke AD_Pending::AD-Pending getPending`;

foreach $pending (@pending) {

chomp $pending;
$pending =~ s/(161)//g;
$pending =~ s/(TM_SNMP)//g;
$pending =~ s/(UNDISCOVERED)//g;
$pending =~ s/(TM_USERADDED)//g;
$pending =~ s/ /\t/g;
$pending =~ s/\{//g;
$pending =~ s/\} /\n/g;
$pending =~ s/ \t//g;
}

open (OUT1, '>>pending.txt');
print OUT1 "Device Name\tIP\tDevice Type\tError Message\tLast Discovery\t\tCommunity String";
print OUT1 @pending;

close OUT1;

Category: 

Share: