xref: /freebsd/usr.sbin/nscd/nscd.8 (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1.\" Copyright (c) 2005 Michael Bushkov <bushman@rsu.ru>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd October 5, 2018
26.Dt NSCD 8
27.Os
28.Sh NAME
29.Nm nscd
30.Nd "name service caching daemon"
31.Sh SYNOPSIS
32.Nm
33.Op Fl dnst
34.Op Fl i Ar cachename
35.Op Fl I Ar cachename
36.Sh DESCRIPTION
37The
38.Nm
39utility
40is the system caching daemon.
41It can cache almost all types of data and is basically intended to be used
42with the
43.Nm nsswitch
44subsystem.
45The cache is actually per-user.
46This means that each user can work only with the
47cached data that were cached by themselves, and cannot poison the
48cache of other users.
49The
50.Nm
51utility supports two types of caching:
52.Bl -tag -width ".Sy Type"
53.It Sy Type
54.Sy Description
55.It Common caching
56Each cached element is the key+value pair.
57This type of caching supports policies which are applied when maximum
58number of cached elements is exceeded.
59Three policies are available:
60.Cm FIFO
61(first in - first out),
62.Cm LRU
63(least recently used) and
64.Cm LFU
65(least frequently used).
66This type of caching is used with the
67.Fn getXXXbyname
68family of functions.
69.It Multipart caching
70Each cached element is the part of the elements sequence.
71This type of caching is intended to be used with the
72.Fn getXXXent
73family of functions.
74.El
75.Pp
76The
77.Nm
78utility is able not only to cache elements, but to perform the actual nsswitch
79lookups by itself.
80To enable this feature, use the
81.Va perform-actual-lookups
82parameter in
83.Xr nscd.conf 5 .
84.Pp
85The
86.Nm
87utility recognizes the following runtime options:
88.Bl -tag -width indent
89.\" .It Fl d
90.\" XXX Document me!
91.It Fl n
92Do not daemonize;
93.Nm
94will not fork or disconnect itself from the terminal.
95.It Fl s
96Single-threaded mode.
97Forces using only one thread for all processing purposes (it overrides
98the
99.Va threads
100parameter in the
101.Xr nscd.conf 5
102file).
103.It Fl t
104Trace mode.
105All trace messages will be written to stdout.
106This mode is usually used with
107.Fl n
108and
109.Fl s
110flags are used for debugging purposes.
111.It Fl i Ar cachename
112Invalidates personal cache.
113When specified,
114.Nm
115acts as the administration tool.
116It asks the already running
117.Nm
118to invalidate the specified part of the cache of the
119calling user.
120For example, sometimes you may want to invalidate your
121.Dq Li hosts
122cache.
123You can specify
124.Dq Li all
125as the
126.Ar cachename
127to invalidate your personal cache as a whole.
128You cannot use this option for the
129.Ar cachename
130for which the
131.Va perform-actual-lookups
132option is enabled.
133.It Fl I Ar cachename
134Invalidates the cache for every user.
135When specified,
136.Nm
137acts as the administration tool.
138It asks the already
139running
140.Nm
141to invalidate the specified part of the cache for
142every user.
143You can specify
144.Dq Li all
145as the
146.Ar cachename
147to invalidate the whole cache.
148Only the root can use this option.
149.El
150.Sh FILES
151.Bl -tag -width ".Pa /etc/nscd.conf" -compact
152.It Pa /etc/nscd.conf
153The default configuration file.
154.El
155.Sh SEE ALSO
156.Xr nsdispatch 3 ,
157.Xr nscd.conf 5 ,
158.Xr nsswitch.conf 5
159.Sh AUTHORS
160.An Michael Bushkov Aq Mt bushman@FreeBSD.org
161