|NSCD(8)||Maintenance Commands and Procedures||NSCD(8)|
/usr/sbin/nscd [-f configuration-file] [-g] [-e cachename, yes | no] [-i cachename]
nscd provides caching for the passwd(5), group(5), hosts(5), ipnodes(5), exec_attr(5), prof_attr(5), user_attr(5), ethers(5), rpc(5), protocols(5), networks(5), bootparams(5), auth_attr(5), services(5), netmasks(5), printers(5), project(5) databases through standard libc interfaces, such as gethostbyname(3NSL), getipnodebyname(3SOCKET), gethostbyaddr(3NSL), and others. Each cache has a separate time-to-live for its data; modifying the local database (/etc/hosts, /etc/resolv.conf, and so forth) causes that cache to become invalidated upon the next call to nscd. The shadow file is specifically not cached. getspnam(3C) calls remain uncached as a result.
nscd also acts as its own administration tool. If an instance of nscd is already running, commands are passed to the running version transparently.
When running with per-user lookups enabled (see nscd.conf(5)), nscd forks one and only one child process (that is, a per-user nscd) on behalf of the user making the request. The per-user nscd will use the credentials of the user to open a per-user connection to the name repository configured for the per-user style of lookups. The lookup will be performed in the child process. The results are cached in the process and are available only to the same user. The caches are managed exactly the same as the main nscd daemon manages its own caches. Subsequent requests from the user will be handled by that per-user nscd until it terminates. The per-user nscd uses a configurable inactivity time-to-live (TTL) value and terminates itself after the inactivity TTL expires.
The maximum number of per-user nscds that can be created by the main nscd is configurable (see nscd.conf(5)). After the maximum number of them are created, the main nscd will use an LRU algorithm to terminate less active child nscds as needed.
The main nscd daemon creates, monitors, and manages all the child nscds. It creates a user's own nscd upon receiving the user's first per-user lookup. When the nscd daemon is started, if per-user lookups are enabled, it checks to ensure all conditions are met before getting ready to create a per-user nscd. When the daemon is stopped, it terminates all the per-user nscds under its control.
Per-user nscds use the same configuration as the main nscd. They read and use the same default configuration file or the one specified with the -f command line option. Once the configuration is read, the per-user nscd will use it for its entire lifetime.
-e cachename, yes|no
example# svcadm disable system/name-service-cache example# svcadm enable system/name-service-cache
The nscd service is managed by the service management facility, smf(7), under the service identifier:
|March 6, 2017||OmniOS|