Idea Details

niscache file deletion

Last activity 05-31-2019 02:10 AM
kanandaguberan's profile image
08-27-2015 07:12 AM



It will be real help if there is an automated mechanism in the controller probe to delete the niscache files basis an overdue age as at times, this can avoid the robot becoming inactive. We have seen instances where we had like 275419 niscache files and the file does not update. Due to this we may need to run a script to delete it often. If this is something made as an out of box feature, it will be of great help.



Ananda Guberan


03-27-2017 07:12 AM

Thank you - with 7000+ robots, iterating through them one at a time isn't an effort that's reasonable to do and depending on the version of nas involved, not something you would want to schedule. Dirscan gets all the robots doing their individual maintenance and plus I get access to the QoS from the directory counts which lets one find issues like with the sql response 1.64 probe.


In your script, you clear the contents and then rest the device id. If you watch the niscache directory while running the reset device id, you will see that it is also cleared. I presume that this is because if the device id changes during the reset that the content of some of the niscache files might also change.



03-27-2017 04:27 AM

Hello, Garin.

Thank you very much for very useful input.

As you noted, we are still using niscache today in so many monitoring probes.

However, we are steadily increasing number of monitoring probes that uses "probe_discovery" subject instead of niscache.

We are still in transition journey.



FYI, Here is an example of little scripting effort of a bulk way housekeeping on every standalone robots.

The concept is similar to what you are doing through dirscan.

BAT - niscache cleanup & robot ID reset 



Yu Ishitani

03-26-2017 11:18 AM

In the "what is niscache" doc, there's a comment that niscache is going away. That is a three year old statement though so I wonder how real it was.


For myself, it is easy enough to manage niscache using the dirscan probe. Just set a profile that runs once a day and triggers on >15000 files or >30 days old on the oldest file. When that happens, run the controller _reset_device_id_and_restart callback. That call back clears the niscache, resets the device id, and restarts the robot all in one clean pop.


active = yes
name = NisCache
description =
schedules = NisCacheSched
pattern = *
directory = ../../../niscache
user =
password =
age_of_oldest = yes
age_check_all = no
check_dir = no
exclude_directory_pattern =
dir_age_check = no
recurse_dirs = no
qos_dir_exists = no
qos_number = yes
qos_space = yes
qos_age = no
qos_response_time = no
number_command = ../bin/pu  controller _reset_device_id_and_restart "" ""
age_command = ../bin/pu controller _reset_device_id_and_restart "" ""
file_size_type = individual
response_time_type = individual
limit = 15000
type = le
limit = 30
type = le
unit = days
usercreationtime = No
unit = Mb
unit = Mb
unit = Kb
unit = milliseconds
file_number_alarm = NIMSOFT_FileNumberAlarm
file_age_alarm = NIMSOFT_FileAgeAlarm
file_size_alarm = NIMSOFT_FileSizeAlarm
file_space_alarm = NIMSOFT_FileSpaceAlarm
file_delta_space_alarm = NIMSOFT_FileDeltaSpaceAlarm
response_time_alarm = NIMSOFT_ResponseTimeAlarm
directory_check_alarm = NIMSOFT_DirectoryCheckAlarm
file_error = NIMSOFT_FileError
dir_age_alarm = NIMSOFT_DirAge

08-27-2015 10:33 AM

Hi ,


  What is niscache ?Where it is triggered ...What is  the impact .Kindly help.