cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
980
Views
0
Helpful
3
Replies

How to delete discovered devices from Campus manager in CLI

oalvi
Level 1
Level 1

I have CM 4.0.5 and I want to delete all discovered devices

I used reinitdb.pl but it doesn?t delete discovered devices

1 Accepted Solution

Accepted Solutions

Yes, the DeleteDevice command will remove devices from the Topology Map. It will not, however, affect the number of _Discovered_ devices. See my previous post for more information about that number.

Additionally, your usage for DeleteDevice is wrong. The file to which it refers should be a plain text file with one device name per line. The cmexport file is an executable wrapper for Campus Manager DEE.

For example, if you wanted to delete two devices with IP addresses 10.1.1.1 and 10.1.1.2 respectively, create a file /tmp/deldev.txt with the following contents:

10.1.1.1

10.1.1.2

Then run:

/opt/CSCOpx/campus/bin/DeleteDevice -user xxxx -password xxxx -file /tmp/deldev.txt

View solution in original post

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

Actually, it does. The number you see in the Campus Manager Administration dashboard is taken from DiscoverStatus.properties. The actual devices are gone, but the number remains. This is purely aesthetic, and will update properly the next time Device Discovery is run.

I found in the Help the below command, but i tried it unsuccessfully.the following output:

root@sec6-12 # ./DeleteDevice -file /opt/CSCOpx/bin/cmexport -user xxxx -passw

ord xxxx

ERROR DeleteDevice: Couldn't read from file. Check if file exists and have permissions

root@sec6-12 #

from Help:((

Deleting Devices

The Delete Device command is used to delete a device managed by Campus Manager from its server.

Usage

DeleteDevice -host hostname -port portnumber -secure -log logfile -device devices -file filename -u unreachable devices -user username -password password )))

Yes, the DeleteDevice command will remove devices from the Topology Map. It will not, however, affect the number of _Discovered_ devices. See my previous post for more information about that number.

Additionally, your usage for DeleteDevice is wrong. The file to which it refers should be a plain text file with one device name per line. The cmexport file is an executable wrapper for Campus Manager DEE.

For example, if you wanted to delete two devices with IP addresses 10.1.1.1 and 10.1.1.2 respectively, create a file /tmp/deldev.txt with the following contents:

10.1.1.1

10.1.1.2

Then run:

/opt/CSCOpx/campus/bin/DeleteDevice -user xxxx -password xxxx -file /tmp/deldev.txt