cnid_metad — daemon for starting cnid_dbd(8) daemons on demand


cnid_metad [ -l loglevel [-f filename] ] [-d] [ -h hostname ] [ -p port ] [ -u user ] [ -g group ] [ -s cnid_dbdpathname ]

cnid_metad -v | -V


cnid_metad waits for requests from afpd to start up instances of the cnid_dbd daemon. It keeps track of the status of a cnid_dbd instance once started and will restart it if necessary. cnid_metad is normally started at boot time from system init scripts or services, and runs until shutdown. afpd needs to be configured with the -cnidserver option in afpd.conf in order to access cnid_metad. It is possible to run more than one instance of cnid_metad on the same machine if different values for the interface and/or port are specified with the -h and -p options.


-l <loglevel> [-f <filename>]

Specify that any message of a log level up to the given loglevel should be logged to the given file. If the filename is omitted, the log level applies to messages passed to syslog. Default is to log to syslog with a default log level of "log_note".

Note: cnid_metad passes this to cnid_dbd which will in turn use this for its logging setup.


Example 5.20. Useful default config

-l log_info -f /var/log/afpd.log

Example 5.21. Debugging config

-l log_maxdebug -f /var/log/afpd.log


cnid_metad will remain in the foreground and also leave the standard input, standard output and standard error file descriptors open. Useful for debugging.

-h hostname

Use hostname as the network interface for requests as opposed to the default localhost. The network address may be specified either in dotted-decimal format for IPv4 or in hexadecimal format for IPv6.

-p port

Use port as the port number for reqests. Default is 4700.

-u user

Switch to the userid of user before serving requests. This userid will be inherited by all cnid_dbd daemon processes started.

-g group

Switch to the groupid of group before serving requests. This groupid will be inherited by all cnid_dbd daemon processes started. Both user and group must be specified as strings.

-s cnid_dbd pathname

Use cnid_dbd pathname as the pathname of the executable of the cnid_dbd daemon.

-v, -V

Show version and exit.


The number of cnid_dbd subprocesses is currently limited to 512.

cnid_metad does not block or catch any signals apart from SIGPIPE. It will therefore exit on most signals received. This will also cause all instances of cnid_dbd started by that cnid_metad to exit gracefully. Since the state of and IPC access to the subprocesses is only maintained in memory by cnid_metad this is desired behaviour. As soon as cnid_metad is restarted afpd processes will transparently reconnect.

See Also

cnid_dbd(8), afpd(8), dbd(1)