This article explains how to query the details on the devices which have been unmanaged from the Smarts NCM console but have not been deleted from the Smarts NCM database.
To query the device OS description, device status, device name and device IP address from the Smarts NCM database, do the following:
Login to NCM DB by using the command:
su - pgdba
2) Now enter below command:
psql voyencedb voyence
3) Give the db password which you had set during the time of installation of the product.
4) Enter the below query:
select os_description, device_status, device_name, management_ip_address from cm_device;
The above query will give the output as:
os_description | device_status | device_name | management_ip_address
-------------------------------------------------------------------------------------------+--------------------------------+--------------
| enum.deviceStatus.unconfigured | -PSEUDODEVICE- |
12.2(5) ENTERPRISE|FIREWALL 2 PLUS 3DES | enum.deviceStatus.operational | r3640-1 | 10.6.xxx.xx
12.0(28c) ENTERPRISE PLUS | enum.deviceStatus.operational | Cust1-HW | 10.6.xxx.x
HP J4121A ProCurve Switch 4000M, revision C.09.26, ROM C.06.01 (/sw/code/build/vgro(c09)) | enum.deviceStatus.operational | hp4000 | 10.6.224.69
4.5.1.2 ISVN:2 | enum.deviceStatus.operational | nortel-450 | 10.6.xxx.xx
12.2(44)SE6 IP|LAYER_3|MIN_DRAM_MEG=64 | enum.deviceStatus.operational | cat3550 | 10.6.xxx.xx
15.0(1)SE LAYER_2|SSH|3DES|MIN_DRAM_MEG=64 | enum.deviceStatus.operational | Switch2969-163 | 10.64.xx.xxx
15.0(1)SE LAYER_2|SSH|3DES|MIN_DRAM_MEG=64 | enum.deviceStatus.operational | conor | 10.64.xx.xxx
(8 rows)