Interesting results for getservbyname() performance ( and possible changes for /etc/services)

Eric Harrison eharrison at mail.mesd.k12.or.us
Thu Jan 12 17:29:12 UTC 2006


Lamont R. Peterson wrote:
> On Thursday 12 January 2006 09:52am, Paul A Houle wrote:
>
>>Nils Philippsen wrote:
>>
>>>nscd can't (or at least doesn't) take advantage of knowing about local
>>>file changes, it caches information for a certain time period and it
>>>doesn't seem to cache services, only passwd, group, hosts.
>>
>>    How often do you update /etc/services?
>>
>>    You can always clear the cache by kicking ncsd.  If you're updating
>>/etc/services via an rpm,  you can kick ncsd in the postinstall script.
>
>
> Actually, I found out differently just yesterday.
>
> I was working on an issue caused by SELinux policy relating to nscd when using
> TLS encrypted LDAP for authentication & user information.  During my testing,
> I had to stop nscd and "rm /var/db/nscd/*" (which only has group, hosts &
> passwd) and then restart nscd, in order to clear the cache.
>
> Is there some mystery switch to do this that I'm missing?
>

mystery switch = -i

nscd -i passwd
nscd -i group
nscd -i hosts


# nscd --help
Usage: nscd [OPTION...]
Name Service Cache Daemon.

   -d, --debug                Do not fork and display messages on the
current
                              tty
   -f, --config-file=NAME     Read configuration data from NAME
   -g, --statistic            Print current configuration statistic
   -i, --invalidate=TABLE     Invalidate the specified cache
   -K, --shutdown             Shut the server down
   -t, --nthreads=NUMBER      Start NUMBER threads
   -?, --help                 Give this help list
       --usage                Give a short usage message
   -V, --version              Print program version


-Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20060112/a17354e8/attachment.sig>


More information about the fedora-devel-list mailing list