2006-04-28 12:03:38 +00:00
|
|
|
.\" Copyright (c) 2005 Michael Bushkov <bushman@rsu.ru>
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2006-04-30 18:34:48 +00:00
|
|
|
.Dd April 30, 2006
|
2007-08-09 13:06:12 +00:00
|
|
|
.Dt NSCD.CONF 5
|
2006-04-28 12:03:38 +00:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
2007-08-09 13:06:12 +00:00
|
|
|
.Nm nscd.conf
|
|
|
|
.Nd "nscd configuration file"
|
2006-09-30 19:07:03 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2006-04-28 12:03:38 +00:00
|
|
|
.Nm
|
2006-09-30 19:07:03 +00:00
|
|
|
file
|
2006-04-28 12:03:38 +00:00
|
|
|
is used by the
|
2007-08-09 13:06:12 +00:00
|
|
|
.Xr nscd 8
|
2006-04-30 21:14:48 +00:00
|
|
|
daemon and is read on its startup.
|
2006-09-30 19:07:03 +00:00
|
|
|
Its syntax is mostly similar to the
|
|
|
|
.Pa nscd.conf
|
|
|
|
syntax in
|
|
|
|
.Tn Linux
|
|
|
|
and
|
|
|
|
.Tn Solaris .
|
|
|
|
It has some differences, though \[em] see them below.
|
2006-04-28 12:03:38 +00:00
|
|
|
.Pp
|
2006-09-30 19:07:03 +00:00
|
|
|
Each line specifies either an attribute and a
|
|
|
|
.Ar value ,
|
|
|
|
or an attribute, a
|
|
|
|
.Ar cachename
|
|
|
|
and a
|
|
|
|
.Ar value .
|
|
|
|
Usual cachenames are
|
|
|
|
.Dq Li passwd ,
|
|
|
|
.Dq Li groups ,
|
|
|
|
.Dq Li hosts ,
|
|
|
|
.Dq Li services ,
|
|
|
|
.Dq Li protocols
|
|
|
|
and
|
|
|
|
.Dq Li rpc .
|
|
|
|
You can also use any other
|
|
|
|
.Ar cachename
|
|
|
|
(for example, if some third-party
|
2006-04-30 21:14:48 +00:00
|
|
|
application uses nsswitch).
|
2006-09-30 19:07:03 +00:00
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Va threads Op Ar value
|
2006-04-30 21:14:48 +00:00
|
|
|
Number of threads, which would listen for connections and process requests.
|
|
|
|
The minimum is 1.
|
|
|
|
The default value is 8.
|
2006-09-30 19:07:03 +00:00
|
|
|
.It Va enable-cache Oo Ar cachename Oc Op Cm yes | no
|
|
|
|
Enables or disables the cache for specified
|
|
|
|
.Ar cachename .
|
|
|
|
.It Va positive-time-to-live Oo Ar cachename Oc Op Ar value
|
2006-04-30 21:14:48 +00:00
|
|
|
Sets the TTL (time-to-live) for the specified cache in seconds.
|
|
|
|
Larger values can increase system's performance, but they also can affect
|
|
|
|
the cache coherence.
|
|
|
|
The default value is 3600.
|
2006-09-30 19:07:03 +00:00
|
|
|
.It Va positive-policy Oo Ar cachename Oc Op Cm fifo | lru | lfu
|
2006-04-28 12:03:38 +00:00
|
|
|
The policy that is applied to erase some of the cache elements, when the
|
2006-09-30 19:07:03 +00:00
|
|
|
size limit of the given
|
|
|
|
.Ar cachename
|
|
|
|
is exceeded.
|
|
|
|
Possible policies are:
|
|
|
|
.Cm fifo
|
|
|
|
(first-in-first-out),
|
|
|
|
.Cm lru
|
|
|
|
(least-recently-used), and
|
|
|
|
.Cm lfu
|
|
|
|
(least-frequently-used).
|
|
|
|
The default policy is
|
|
|
|
.Cm lru .
|
|
|
|
.It Va negative-time-to-live Oo Ar cachename Oc Op Ar value
|
2006-04-30 21:14:48 +00:00
|
|
|
The TTL of the negative cached elements in seconds.
|
|
|
|
The larger values can significantly increase system performance in some
|
|
|
|
environments (when dealing with files with UIDs, which are not in system
|
|
|
|
databases, for example).
|
|
|
|
This number should be kept low to avoid the cache coherence problems.
|
|
|
|
The default value is 60.
|
2006-09-30 19:07:03 +00:00
|
|
|
.It Va negative-policy Oo Ar cachename Oc Op Cm fifo | lru | lfu
|
2006-04-28 12:03:38 +00:00
|
|
|
The same as the positive-policy, but this one is applied to the negative
|
2006-09-30 19:07:03 +00:00
|
|
|
elements of the given
|
|
|
|
.Ar cachename .
|
2006-04-30 21:14:48 +00:00
|
|
|
The default policy is fifo.
|
2006-09-30 19:07:03 +00:00
|
|
|
.It Va suggested-size Oo Ar cachename Oc Op Ar value
|
2006-04-30 21:14:48 +00:00
|
|
|
This is the internal hash table size.
|
|
|
|
The value should be a prime number for optimum performance.
|
|
|
|
You should only change this value when the number of cached elements is
|
|
|
|
significantly (in 5-10 times) greater then the default hash table size (255).
|
2006-09-30 19:07:03 +00:00
|
|
|
.It Va keep-hot-count Oo Ar cachename Oc Op Ar value
|
|
|
|
The size limit of the cache with the given
|
|
|
|
.Ar cachename .
|
2006-04-30 21:14:48 +00:00
|
|
|
When it is exceeded, the policy will be applied.
|
|
|
|
The default value is 2048.
|
2006-09-30 19:07:03 +00:00
|
|
|
.It Va perform-actual-lookups Oo Ar cachename Oc Op Cm yes | no
|
2006-04-28 12:03:38 +00:00
|
|
|
If enabled, the
|
2007-08-09 13:06:12 +00:00
|
|
|
.Xr nscd 8
|
2006-04-30 21:14:48 +00:00
|
|
|
does not simply receive and cache the NSS-requests results, but performs
|
|
|
|
all the lookups by itself and only returns the responses.
|
2006-09-30 19:07:03 +00:00
|
|
|
If this feature is enabled, then for the given
|
|
|
|
.Ar cachename
|
2007-08-09 13:06:12 +00:00
|
|
|
.Xr nscd 8
|
2006-04-28 12:03:38 +00:00
|
|
|
will act similarly to the NSCD.
|
|
|
|
.Pp
|
2006-09-30 19:07:03 +00:00
|
|
|
.Sy NOTE :
|
|
|
|
this feature is currently experimental \[em] it supports only
|
|
|
|
.Dq Li passwd ,
|
|
|
|
.Dq Li groups
|
|
|
|
and
|
|
|
|
.Dq Li services
|
|
|
|
cachenames.
|
2006-04-30 21:14:48 +00:00
|
|
|
.El
|
2006-09-30 19:07:03 +00:00
|
|
|
.Sh NOTES
|
|
|
|
You can use the
|
|
|
|
.Ql #
|
2006-04-28 12:03:38 +00:00
|
|
|
symbol at the beginning of the line for comments.
|
2006-09-30 19:07:03 +00:00
|
|
|
.Sh FILES
|
2007-08-09 13:06:12 +00:00
|
|
|
.Bl -tag -width ".Pa /etc/nscd.conf" -compact
|
|
|
|
.It Pa /etc/nscd.conf
|
2006-09-30 19:07:03 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
2007-08-09 13:06:12 +00:00
|
|
|
.Xr nscd 8
|
2006-09-30 19:07:03 +00:00
|
|
|
.Sh AUTHORS
|
|
|
|
.An Michael Bushkov
|
2007-08-09 13:06:12 +00:00
|
|
|
.Aq bushman@freebsd.org
|
2006-09-30 19:07:03 +00:00
|
|
|
.Sh BUGS
|
|
|
|
Please send bug reports and suggestions to
|
2007-08-09 13:06:12 +00:00
|
|
|
.Aq bushman@freebsd.org .
|