Rob Lines
2008-Jun-20 13:54 UTC
[CentOS] Autofs and mount/umount entries in the nfs server logs
I am using autofs for a number of machines connecting nfs shares. All the mount and unmount log entries on the server are being saved to /var/log/messages currently. This is becoming a bit of a pain because as the number of hosts increase and various monitoring scripts check to be sure that they have access to the nfs shares it is filling up messages on the nfs server. I would like to continue to see these messages but I would like to see them put else where but looking through the documentation for syslog I couldn't find any way to separate just those messages out. I assume(hope) that someone else has run into this problem and found a way around it. My googlefoo has failed me on this one though I might just not be looking for the right thing. Thanks, Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20080620/07c7334c/attachment-0002.html>
Filipe Brandenburger
2008-Jun-20 22:57 UTC
[CentOS] Autofs and mount/umount entries in the nfs server logs
On Fri, Jun 20, 2008 at 9:54 AM, Rob Lines <rlinesseagate at gmail.com> wrote:> I would like to continue to see these messages but I would like to > see them put else where but looking through the documentation for syslog I > couldn't find any way to separate just those messages out.I also have the same problem, but until now I hadn't looked for a fix for it. I downloaded the source code, and it seems to me that automount uses the "daemon" facility. So, in theory, you should be able to redirect these messages by setting your syslog.conf like this: # add daemon.none to the line below to suppress those lines from messages *.info;mail.none;news.none;authpriv.none;cron.none;daemon.none /var/log/messages # create a new log for the daemon facility daemon.info /var/log/automount Optionally, add a "-" in front of the automount log, specially if you expect a lot of messages from that daemon. This might also create side effects, since there are probably other daemons that use the "daemon" facility, but it actually depends on what else you are running on the machine (maybe nothing uses that facility). If that's the case for you, you might want to change the filename to /var/log/daemon, so it would be automount + some other things. The long-term solution for this problem is rsyslog, it permits a much better filtering of the logs. It will be available in base CentOS from 5.2 from what I heard. Let us know if that worked! HTH, Filipe