All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs-utils - Silencing mountd
@ 2004-06-16 15:14 Steve Dickson
  2004-06-16 22:45 ` Greg Banks
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Dickson @ 2004-06-16 15:14 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

Hello,

Here is a patch to the nfs-utils-1.0.6 rpc.mountd that
eliminates 4 syslog messages that are logged during
_successful_ mounts and showmount queries. This should
save quite a bit of disk space w.r.t syslog logs.

3 of the were converted to error messages
and one was eliminated.

Question: Does anybody depend on or use these messages?
If not, could this be added to the next release of
nfs-utils?

SteveD.




[-- Attachment #2: nfs-utils-1.0.6-mountd-nonverbose.patch --]
[-- Type: text/plain, Size: 1851 bytes --]

--- src/utils/mountd/mountd.c.org	2003-09-12 18:14:16.000000000 -0400
+++ src/utils/mountd/mountd.c	2004-06-16 09:31:06.000000000 -0400
@@ -90,10 +90,11 @@ mount_dump_1_svc(struct svc_req *rqstp, 
 {
 	struct sockaddr_in *addr =
 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-	xlog(L_NOTICE, "dump request from %s",
-		inet_ntoa(addr->sin_addr));
 
-	*res = mountlist_list();
+	if ((*res = mountlist_list()) == NULL)
+		xlog(L_WARNING, "dump request from %s failed.",
+			inet_ntoa(addr->sin_addr));
+
 	return 1;
 }
 
@@ -143,9 +144,11 @@ mount_export_1_svc(struct svc_req *rqstp
 {
 	struct sockaddr_in *addr =
 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-	xlog(L_NOTICE, "export request from %s",
-		inet_ntoa(addr->sin_addr));
-	*resp = get_exportlist();
+
+	if ((*resp = get_exportlist()) == NULL)
+		xlog(L_WARNING, "export request from %s failed.",
+			inet_ntoa(addr->sin_addr));
+		
 	return 1;
 }
 
@@ -154,9 +157,10 @@ mount_exportall_1_svc(struct svc_req *rq
 {
 	struct sockaddr_in *addr =
 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-	xlog(L_NOTICE, "exportall request from %s",
-		inet_ntoa(addr->sin_addr));
-	*resp = get_exportlist();
+
+	if ((*resp = get_exportlist()) == NULL)
+		xlog(L_WARNING, "exportall request from %s failed.",
+			inet_ntoa(addr->sin_addr));
 	return 1;
 }
 
--- src/utils/mountd/auth.c.org	2004-06-16 08:54:32.000000000 -0400
+++ src/utils/mountd/auth.c	2004-06-16 08:55:15.000000000 -0400
@@ -194,9 +194,8 @@ auth_authenticate(char *what, struct soc
 		break;
 
 	case success:
-		xlog(L_NOTICE, "authenticated %s request from %s:%d for %s (%s)",
-		     what, hp->h_name, ntohs(caller->sin_port), path, epath);
 		break;
+
 	default:
 		xlog(L_NOTICE, "%s request from %s:%d for %s (%s) gave %d",
 		     what, hp->h_name, ntohs(caller->sin_port), path, epath, error);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nfs-utils - Silencing mountd
  2004-06-16 15:14 [PATCH] nfs-utils - Silencing mountd Steve Dickson
@ 2004-06-16 22:45 ` Greg Banks
  2004-06-17 19:00   ` Steve Dickson
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Banks @ 2004-06-16 22:45 UTC (permalink / raw)
  To: Steve Dickson; +Cc: nfs

G'day,

On Wed, Jun 16, 2004 at 11:14:25AM -0400, Steve Dickson wrote:
> Here is a patch to the nfs-utils-1.0.6 rpc.mountd that
> eliminates 4 syslog messages that are logged during
> _successful_ mounts and showmount queries. This should
> save quite a bit of disk space w.r.t syslog logs.

Actually, I find the "authenticated mount request from..."  message
useful in tracking down strange but nonfatal bugs on busy servers with
many mounts from many clients.  Not all NFS or RPC error messages
tell you which client was involved, so correlating those messages
with mount messages can help narrow the list.

But the other 3 are noise.

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nfs-utils - Silencing mountd
  2004-06-16 22:45 ` Greg Banks
@ 2004-06-17 19:00   ` Steve Dickson
  2004-06-17 22:13     ` Greg Banks
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Dickson @ 2004-06-17 19:00 UTC (permalink / raw)
  To: Greg Banks; +Cc: nfs

Greg Banks wrote:

>Actually, I find the "authenticated mount request from..."  message
>useful in tracking down strange but nonfatal bugs on busy servers with
>many mounts from many clients.  Not all NFS or RPC error messages
>tell you which client was involved, so correlating those messages
>with mount messages can help narrow the list.
>  
>
True... the authenticated message is a good way to see that
a client is able to communicate with the server... but
in reality it doesn't mean much... and every error message
in the same code path (i.e. in  auth_authenticate()) gives a pretty
detail error message of who and what happen..


SteveD.


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nfs-utils - Silencing mountd
  2004-06-17 19:00   ` Steve Dickson
@ 2004-06-17 22:13     ` Greg Banks
  2004-06-18 13:02       ` Steve Dickson
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Banks @ 2004-06-17 22:13 UTC (permalink / raw)
  To: Steve Dickson; +Cc: nfs

On Thu, Jun 17, 2004 at 03:00:26PM -0400, Steve Dickson wrote:
> Greg Banks wrote:
> 
> >Actually, I find the "authenticated mount request from..."  message
> >useful [...]
> >
> True... the authenticated message is a good way to see that
> a client is able to communicate with the server... but
> in reality it doesn't mean much... and every error message
> in the same code path (i.e. in  auth_authenticate()) gives a pretty
> detail error message of who and what happen..

Sure, but I'm talking about cases where you get wacky interop
problems in NFS or NLM traffic in the few minutes after the mount
sequence.

Also, there are times when it's useful to "tail -f" the syslog
looking for these messages, e.g. at Cthon you can tell whose
testing against your server at any moment.  If you see a strange
message you can wander over and talk to those guys and start a
debugging session.  This was how the MacOS X lock cookie issue
was found at Cthon '03.

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nfs-utils - Silencing mountd
  2004-06-17 22:13     ` Greg Banks
@ 2004-06-18 13:02       ` Steve Dickson
  0 siblings, 0 replies; 5+ messages in thread
From: Steve Dickson @ 2004-06-18 13:02 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 134 bytes --]

Ok, here is the patch with the "authenticated message" put
back... It turns out the message is more useful than I though...

SteveD.


[-- Attachment #2: nfs-utils-1.0.6-mountd-nonverbose2.patch --]
[-- Type: text/plain, Size: 1338 bytes --]

--- src/utils/mountd/mountd.c.org	2003-09-12 18:14:16.000000000 -0400
+++ src/utils/mountd/mountd.c	2004-06-16 09:31:06.000000000 -0400
@@ -90,10 +90,11 @@ mount_dump_1_svc(struct svc_req *rqstp, 
 {
 	struct sockaddr_in *addr =
 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-	xlog(L_NOTICE, "dump request from %s",
-		inet_ntoa(addr->sin_addr));
 
-	*res = mountlist_list();
+	if ((*res = mountlist_list()) == NULL)
+		xlog(L_WARNING, "dump request from %s failed.",
+			inet_ntoa(addr->sin_addr));
+
 	return 1;
 }
 
@@ -143,9 +144,11 @@ mount_export_1_svc(struct svc_req *rqstp
 {
 	struct sockaddr_in *addr =
 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-	xlog(L_NOTICE, "export request from %s",
-		inet_ntoa(addr->sin_addr));
-	*resp = get_exportlist();
+
+	if ((*resp = get_exportlist()) == NULL)
+		xlog(L_WARNING, "export request from %s failed.",
+			inet_ntoa(addr->sin_addr));
+		
 	return 1;
 }
 
@@ -154,9 +157,10 @@ mount_exportall_1_svc(struct svc_req *rq
 {
 	struct sockaddr_in *addr =
 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-	xlog(L_NOTICE, "exportall request from %s",
-		inet_ntoa(addr->sin_addr));
-	*resp = get_exportlist();
+
+	if ((*resp = get_exportlist()) == NULL)
+		xlog(L_WARNING, "exportall request from %s failed.",
+			inet_ntoa(addr->sin_addr));
 	return 1;
 }
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-06-18 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-16 15:14 [PATCH] nfs-utils - Silencing mountd Steve Dickson
2004-06-16 22:45 ` Greg Banks
2004-06-17 19:00   ` Steve Dickson
2004-06-17 22:13     ` Greg Banks
2004-06-18 13:02       ` Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.