SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Okay, I give up. I prefer to have separate NFS logs. I notice the nfs-utils package created a /var/log/nfsd directory but there are no logs stored there. I would like that to happen. Surfing revealed little (the Solaris version seems to have a nfslogd that nobody else has). Anybody know some simple tricks to route all NFS related logs to /var/log/nfsd?
Actually it's syslog.conf not syslogd.conf as I mispoke. This is used by the syslogd daemon to determine what to log and where.
Format is fairly simple and the one you have probably has good examples. It should be /etc/syslog.conf.
Basically you have service and level of message.
If all the messages you're seeing in /var/log/messages (I'm assuming that's where you're seeing them) go say "nfsd" in them then likely simply adding:
nfsd.* /var/log/nfsd
Then bounce the syslogd daemon to reread syslog.conf.
That line tells it to send all nfsd generated messages, (info, warn, critical etc...) to /var/log/nfsd.
When restarting the syslog service, all entries resulted in the error message:
unknown facility name
Further surfing and reading the syslog man page revealed none of the above options are valid. The only facility option that comes close is the daemon option or one of the local options.
The primary clutter point is mountd. I would prefer those log entries go into a separate log rather than clutter the normal logs.
I tried daemon.*. That works but then all daemon log output is duplicated to the new associated log, as well as cluttering /var/log/messages. So that accomplishes nothing.
Funny thing, there is a /var/log/nfsd/mountd file being created when I reboot. I deleted the file but something recreated the file. The file size is zero and then nothing is ever entered into the file.
My bad. After doing a lot of research I can't see how to do this for rpc.mountd or nfsd. I see many people have asked the question but no one ever seems to have gotten a good response.
The facilities are defined in /usr/include/sys/syslog.h and don't include nfs or rpc stuff. It's possible that someone better at C than I am could figure out how to add rpc.mountd as a facility there though I suspect it isn't that simple - probably requires modifying the rpc.mountd to be more specific about about where it logs. Documentation for rpc simply says it sends its information to syslog(3).
Indeed there is no nfs facilities in syslog.h, there are user facilities like LOG_LOCAL0 to LOG_LOCAL7 but nfs module would have to be reprogrammed to include one of those facilities
I guess the best way is to program a parser that will extract nfs logs lines
I suspected as much after reading the syslog man page. These are the little things that sometimes annoy me about some free software tools. Usability features often are lacking.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.