The NSCD service caches name service lookups and can dramatically improve with DNS queries locally. However, sometimes you might want to clear the NSCD cache for troubleshooting DNS issues or other reasons. NSCD cache data is stored in these database files:
/var/db/nscd
├── group
├── hosts
├── netgroup
├── passwd
└── services
We can use the command nscd -i to invalidate these databases individually and then restart the service to make our changes persistent. The following command will do both of these steps at once:
for db in `ls /var/db/nscd`;do /usr/sbin/nscd -i $db;done && /scripts/restartsrv_nscd
Comments
0 comments
Article is closed for comments.