diff --git a/snmpd-oid-daemon.sh b/snmpd-oid-daemon.sh index 2cf2509..88a439d 100644 --- a/snmpd-oid-daemon.sh +++ b/snmpd-oid-daemon.sh @@ -365,12 +365,15 @@ declare -A OIDTYPES function clear_cached_oid() { local base_oid=$1 local oid + local count=0 for oid in ${!OIDDATA[@]}; do if [[ $oid == $base_oid.* ]]; then unset OIDDATA[$oid] unset OIDTYPES[$oid] + ((count++)) fi done + echo "cache: removed $count OIDs" >&$DEBUGLOG return 0 }