176c09b997c3414456b258c19f2349a89dd5eeed
[dragonfly.git] / usr.sbin / nscd / nscd.8
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 .\" $FreeBSD: src/usr.sbin/nscd/nscd.8,v 1.10 2007/09/27 12:30:11 bushman Exp $
26 .\"
27 .Dd October 20, 2005
28 .Dt NSCD 8
29 .Os
30 .Sh NAME
31 .Nm nscd
32 .Nd "name service caching daemon"
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl dnst
36 .Op Fl i Ar cachename
37 .Op Fl I Ar cachename
38 .Sh DESCRIPTION
39 The
40 .Nm
41 utility
42 is the system caching daemon.
43 It can cache almost all types of data and is basically intended to be used
44 with the
45 .Nm nsswitch
46 subsystem.
47 The cache is actually per-user.
48 This means that each user can work only with the
49 cached data that were cached by themselves, and cannot poison the
50 cache of other users.
51 The
52 .Nm
53 utility supports two types of caching:
54 .Bl -tag -width ".Sy Type"
55 .It Sy Type
56 .Sy Description
57 .It Common caching
58 Each cached element is the key+value pair.
59 This type of caching supports policies which are applied when maximum
60 number of cached elements is exceeded.
61 Three policies are available:
62 .Cm FIFO
63 (first in - first out),
64 .Cm LRU
65 (least recently used) and
66 .Cm LFU
67 (least frequently used).
68 This type of caching is used with the
69 .Fn getXXXbyname
70 family of functions.
71 .It Multipart caching
72 Each cached element is the part of the elements sequence.
73 This type of caching is intended to be used with the
74 .Fn getXXXent
75 family of functions.
76 .El
77 .Pp
78 The
79 .Nm
80 utility is able not only to cache elements, but to perform the actual nsswitch
81 lookups by itself.
82 To enable this feature, use the
83 .Va perform-actual-lookups
84 parameter in
85 .Xr nscd.conf 5 .
86 .Pp
87 The
88 .Nm
89 utility recognizes the following runtime options:
90 .Bl -tag -width indent
91 .\" .It Fl d
92 .\" XXX Document me!
93 .It Fl n
94 Do not daemonize;
95 .Nm
96 will not fork or disconnect itself from the terminal.
97 .It Fl s
98 Single-threaded mode.
99 Forces using only one thread for all processing purposes (it overrides
100 the
101 .Va threads
102 parameter in the
103 .Xr nscd.conf 5
104 file).
105 .It Fl t
106 Trace mode.
107 All trace messages will be written to stdout.
108 This mode is usually used with
109 .Fl n
110 and
111 .Fl s
112 flags are used for debugging purposes.
113 .It Fl i Ar cachename
114 Invalidates personal cache.
115 When specified,
116 .Nm
117 acts as the administration tool.
118 It asks the already running
119 .Nm
120 to invalidate the specified part of the cache of the
121 calling user.
122 For example, sometimes you may want to invalidate your
123 .Dq Li hosts
124 cache.
125 You can specify
126 .Dq Li all
127 as the
128 .Ar cachename
129 to invalidate your personal cache as a whole.
130 You cannot use this option for the
131 .Ar cachename
132 for which the
133 .Va perform-actual-lookups
134 option is enabled.
135 .It Fl I Ar cachename
136 Invalidates the cache for every user.
137 When specified,
138 .Nm
139 acts as the administration tool.
140 It asks the already
141 running
142 .Nm
143 to invalidate the specified part of the cache for
144 every user.
145 You can specify
146 .Dq Li all
147 as the
148 .Ar cachename
149 to invalidate the whole cache.
150 Only the root can use this option.
151 .El
152 .Sh FILES
153 .Bl -tag -width ".Pa /etc/nscd.conf" -compact
154 .It Pa /etc/nscd.conf
155 The default configuration file.
156 .El
157 .Sh SEE ALSO
158 .Xr nsdispatch 3 ,
159 .Xr nscd.conf 5 ,
160 .Xr nsswitch.conf 5
161 .Sh AUTHORS
162 .An Michael Bushkov Aq bushman@freebsd.org
163 .Sh BUGS
164 Please send bug reports and suggestions to
165 .Aq bushman@freebsd.org .