This article describes a method to quickly and easily clean the niscache folder across all active robots in your UIM domain from the command line of a hub.
Occasionally, it becomes necessary to purge the niscache folder across all robots in a domain, and/or reset the device_id on every robot.
This is due to the behavior of probes creating niscache entries but not deleting them once a profile or probe has been removed from a robot. Using this approach, the niscache for each robot is deleted and the robot device id is reset. A list of robots containing the robots NimBUS addresses can be leveraged in large environments.
Instructions For Windows:
SELECT address FROM CM_NIMBUS_ROBOT WHERE alive_time > DATEADD(hh, -24, GETDATE()) AND robot_active = 1 ORDER BY is_hub;
Instructions For Linux:
SELECT address FROM CM_NIMBUS_ROBOT WHERE alive_time > DATEADD(hh, -24, GETDATE()) AND robot_active = 1 ORDER BY is_hub;
Note: In some cases, you may not be able to obtain the list of robots, or for some reason they may not be communicating with the hub, and you will need to reset the niscache/restart all robots by IP address only, meaning that you cannot use a NimBUS-style address to reach them.
In this case, you can use the same process outlined above, with a few changes:
1. Fill the RobotList.txt with the IP addresses of the robots you want to reset. There are multiple ways to obtain such a list which won't be covered here, but the important thing is that you need a list of IP's that are reachable directly from a hub; you will have to run this process on each hub, pointed at that hub's own robots (in other words, this process is hub-to-robot based and doesn't respect UIM tunnels.)
2. Edit the cleanrobots.sh/bat file and alter it as follows:
a. For Linux, change: $PASSWORD $line/controller to: $PASSWORD -H $line
b. for Windows, change: PASSWORD% %%A/controller to: PASSWORD% -H %%A
3. Execute the file as outlined above - now the probe utility will send commands to the IP given (on port 48002) instead of using the nimbus address.