LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-03-2008, 05:19 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
NFS Logs


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?

Thanks again.
 
Old 11-04-2008, 09:47 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Are you getting no logging at all or is it just not going where you want?

If it is the latter you can easily redirect it by modifying syslogd.conf.
 
Old 11-04-2008, 08:03 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Yup, plenty of logs just nothing going to /var/log/nfsd.

Quote:
you can easily redirect it by modifying syslogd.conf
Please explain!
 
Old 11-04-2008, 08:32 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 11-04-2008, 11:48 PM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
I tried the following:

nfsd.* -/var/log/nfsd/mountd
nfs.* -/var/log/nfsd/mountd
mountd.* -/var/log/nfsd/mountd
mount.* -/var/log/nfsd/mountd

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.
 
Old 11-05-2008, 08:31 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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).
 
Old 11-05-2008, 12:07 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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
 
Old 11-05-2008, 05:33 PM   #8
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding LDAP Server Logs / Application Logs in Linux arbignay Linux - Newbie 2 03-24-2008 09:54 AM
Firewall logs in logs and terminal... robbow52 Debian 7 11-20-2004 07:13 PM
Firefox logs user out? Where are error logs? case1984 Linux - General 0 10-09-2004 02:22 PM
Separate firewall logs and general logs dominant Linux - General 3 04-20-2004 01:26 AM
Apache logs - ???Linux logs??? mylo2003 Linux - General 3 08-07-2003 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration