[oracle@oem ~]$ cd /oem/oms/oms/bin
登录到oms中
[oracle@oem bin]$ ./emcli login -username=sysman
Enter password :
Login successful
[oracle@oem bin]$ ./emcli login -username=sysman
Enter password :
Login successful
同步信息
[oracle@oem bin]$ ./emcli sync
Synchronized successfully
[oracle@oem bin]$ ./emcli sync
Synchronized successfully
获取当前该主机mwtest02的agent所关联的targets
[oracle@oem bin]$ ./emcli get_targets | grep mwtest02
5 Under Blackout host mwtest02
5 Under Blackout oracle_emd mwtest02:3872
[oracle@oem bin]$ ./emcli get_targets | grep mwtest02
5 Under Blackout host mwtest02
5 Under Blackout oracle_emd mwtest02:3872
执行删除操作,并关联所有相关targets
[oracle@oem bin]$ ./emcli delete_target -name='mwtest02:3872' -type='oracle_emd' -delete_monitored_targets
Target "mwtest02:3872:oracle_emd" deleted successfully
[oracle@oem bin]$ ./emcli delete_target -name='mwtest02:3872' -type='oracle_emd' -delete_monitored_targets
Target "mwtest02:3872:oracle_emd" deleted successfully
确认
[oracle@oem bin]$ ./emcli get_targets | grep mwtest02
[oracle@oem bin]$ ./emcli get_targets | grep mwtest02
登出
[oracle@oem bin]$ ./emcli logout
Logout successful
[oracle@oem bin]$
[oracle@oem bin]$ ./emcli logout
Logout successful
[oracle@oem bin]$