Skip to contentSkip to conversation

multipathd: decrease log verbosity

PATCH In review Martin Wilck 2 participants 6 messages Apr 4, 2018 – Apr 12, 2018 Device mapper

lore
Share & tools
lore
#0 lore raw

cover multipathd: decrease log verbosity

This patch set decreases the log level of some messages that we see often time and that aren't usually helpful for debugging.

Martin Wilck (4):
multipathd: decrease log level of "spurious uevent" message
libmultipath: decrease log level of uevent filter/merge messages
multipathd: decrease log level of waiter thread start/stop msgs
libmpathpersist: decrease log level of various messages

 libmpathpersist/mpath_persist.c  |  2 +-
 libmpathpersist/mpath_pr_ioctl.c | 32 ++++++++++++++++----------------
 libmultipath/uevent.c            |  4 ++--
 multipathd/main.c                |  2 +-
 multipathd/waiter.c              |  4 ++--
 5 files changed, 22 insertions(+), 22 deletions(-)
Signature · 1 line
2.16.1
#1 lore raw

PATCH 1/4 multipathd: decrease log level of "spurious uevent" message

We trigger such events under various conditions, there's no point logging them at -v2.

---
 multipathd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
multipathd/main.c +1 -1
index 7eeb743..7886c76 100644
@@ -820,7 +820,7 @@ uev_add_path (struct uevent *uev, struct vectors * vecs, int need_do_map)
 	if (pp) {
 		int r;
 
-		condlog(2, "%s: spurious uevent, path already in pathvec",
+		condlog(3, "%s: spurious uevent, path already in pathvec",
 			uev->kernel);
 		if (!pp->mpp && !strlen(pp->wwid)) {
 			condlog(3, "%s: reinitialize path", uev->kernel);
Signature · 1 line
2.16.1
#2 lore raw

PATCH 2/4 libmultipath: decrease log level of uevent filter/merge messages

In reply to Martin Wilck

There should be no need to log these at -v2. The messages are informational.

---
 libmultipath/uevent.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
libmultipath/uevent.c +2 -2
index 3955c49..fd8ca35 100644
@@ -333,7 +333,7 @@ uevent_filter(struct uevent *later, struct list_head *tmpq)
 		 * by the later uevent
 		 */
 		if (uevent_can_filter(earlier, later)) {
-			condlog(2, "uevent: %s-%s has filtered by uevent: %s-%s",
+			condlog(3, "uevent: %s-%s has filtered by uevent: %s-%s",
 				earlier->kernel, earlier->action,
 				later->kernel, later->action);
 
@@ -357,7 +357,7 @@ uevent_merge(struct uevent *later, struct list_head *tmpq)
 		 * merge earlier uevents to the later uevent
 		 */
 		if (uevent_can_merge(earlier, later)) {
-			condlog(2, "merged uevent: %s-%s-%s with uevent: %s-%s-%s",
+			condlog(3, "merged uevent: %s-%s-%s with uevent: %s-%s-%s",
 				earlier->action, earlier->kernel, earlier->wwid,
 				later->action, later->kernel, later->wwid);
 
Signature · 1 line
2.16.1
#3 lore raw

PATCH 3/4 multipathd: decrease log level of waiter thread start/stop msgs

In reply to Martin Wilck

These rather unimportant messages account for a large portion of multipathd's log messages with the default verbosity level (2).

---
 multipathd/waiter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
multipathd/waiter.c +2 -2
index 595c69a..6c896f7 100644
@@ -62,7 +62,7 @@ void stop_waiter_thread (struct multipath *mpp, struct vectors *vecs)
 	if (pthread_equal(mpp->waiter, pthread_self()))
 		return;
 
-	condlog(2, "%s: stop event checker thread (%lu)", mpp->alias,
+	condlog(3, "%s: stop event checker thread (%lu)", mpp->alias,
 		mpp->waiter);
 	thread = mpp->waiter;
 	mpp->waiter = (pthread_t)0;
@@ -219,7 +219,7 @@ int start_waiter_thread (struct multipath *mpp, struct vectors *vecs)
 		goto out1;
 	}
 	mpp->waiter = wp->thread;
-	condlog(2, "%s: event checker started", wp->mapname);
+	condlog(3, "%s: event checker started", wp->mapname);
 
 	return 0;
 out1:
Signature · 1 line
2.16.1
#4 lore raw

PATCH 4/4 libmpathpersist: decrease log level of various messages

In reply to Martin Wilck

Silence a few libmpathpersist messages which need not be printed at the default loglevel.

---
 libmpathpersist/mpath_persist.c  |  2 +-
 libmpathpersist/mpath_pr_ioctl.c | 32 ++++++++++++++++----------------
 2 files changed, 17 insertions(+), 17 deletions(-)
libmpathpersist/mpath_persist.c +1 -1
index 5199e42..907a17c 100644
@@ -909,7 +909,7 @@ int update_map_pr(struct multipath *mpp)
 
 	if (resp->prin_descriptor.prin_readkeys.additional_length == 0 )
 	{
-		condlog(0,"%s: No key found. Device may not be registered. ", mpp->alias);
+		condlog(3,"%s: No key found. Device may not be registered. ", mpp->alias);
 		free(resp);
 		return MPATH_PR_SUCCESS;
 	}
libmpathpersist/mpath_pr_ioctl.c +16 -16
index dbed4ca..6dd7403 100644
@@ -77,14 +77,14 @@ int prout_do_scsi_ioctl(char * dev, int rq_servact, int rq_scope,
 	cdb[8] = (unsigned char)(paramlen & 0xff);
 
 retry :
-	condlog(3, "%s: rq_servact = %d", dev, rq_servact);
-	condlog(3, "%s: rq_scope = %d ", dev, rq_scope);
-	condlog(3, "%s: rq_type = %d ", dev, rq_type);
-	condlog(3, "%s: paramlen = %d", dev, paramlen);
+	condlog(4, "%s: rq_servact = %d", dev, rq_servact);
+	condlog(4, "%s: rq_scope = %d ", dev, rq_scope);
+	condlog(4, "%s: rq_type = %d ", dev, rq_type);
+	condlog(4, "%s: paramlen = %d", dev, paramlen);
 
 	if (noisy)
 	{
-		condlog(3, "%s: Persistent Reservation OUT parameter:", dev);
+		condlog(4, "%s: Persistent Reservation OUT parameter:", dev);
 		dumpHex((const char *)paramp, paramlen,1);
 	}
 
@@ -113,7 +113,7 @@ retry :
 		return ret;
 	}
 
-	condlog(2, "%s: Duration=%u (ms)", dev, io_hdr.duration);
+	condlog(4, "%s: Duration=%u (ms)", dev, io_hdr.duration);
 
 	status = mpath_translate_response(dev, io_hdr, &Sensedata, noisy);
 	condlog(3, "%s: status = %d", dev, status);
@@ -121,7 +121,7 @@ retry :
 	if (status == MPATH_PR_SENSE_UNIT_ATTENTION && (retry > 0))
 	{
 		--retry;
-		condlog(2, "%s: retrying for Unit Attention. Remaining retries = %d",
+		condlog(3, "%s: retrying for Unit Attention. Remaining retries = %d",
 			dev, retry);
 		goto retry;
 	}
@@ -131,7 +131,7 @@ retry :
 	{
 		usleep(1000);
 		--retry;
-		condlog(2, "%s: retrying for sense 02/04/07."
+		condlog(3, "%s: retrying for sense 02/04/07."
 			" Remaining retries = %d", dev, retry);
 		goto retry;
 	}
@@ -224,7 +224,7 @@ void mpath_format_readfullstatus(struct prin_resp *pr_buff, int len, int noisy)
 
 	if (pr_buff->prin_descriptor.prin_readfd.number_of_descriptor == 0)
 	{
-		condlog(2, "No registration or resrvation found.");
+		condlog(3, "No registration or resrvation found.");
 		return;
 	}
 
@@ -351,15 +351,15 @@ retry :
 
 	got = mx_resp_len - io_hdr.resid;
 
-	condlog(2, "%s: duration = %u (ms)", dev, io_hdr.duration);
-	condlog(2, "%s: persistent reservation in: requested %d bytes but got %d bytes)", dev, mx_resp_len, got);
+	condlog(3, "%s: duration = %u (ms)", dev, io_hdr.duration);
+	condlog(4, "%s: persistent reservation in: requested %d bytes but got %d bytes)", dev, mx_resp_len, got);
 
 	status = mpath_translate_response(dev, io_hdr, &Sensedata, noisy);
 
 	if (status == MPATH_PR_SENSE_UNIT_ATTENTION && (retry > 0))
 	{
 		--retry;
-		condlog(2, "%s: retrying for Unit Attention. Remaining retries = %d", dev, retry);
+		condlog(3, "%s: retrying for Unit Attention. Remaining retries = %d", dev, retry);
 		goto retry;
 	}
 
@@ -368,7 +368,7 @@ retry :
 	{
 		usleep(1000);
 		--retry;
-		condlog(2, "%s: retrying for 02/04/07. Remaining retries = %d", dev, retry);
+		condlog(3, "%s: retrying for 02/04/07. Remaining retries = %d", dev, retry);
 		goto retry;
 	}
 
@@ -414,7 +414,7 @@ int mpath_translate_response (char * dev, struct sg_io_hdr io_hdr,
 	case SAM_STAT_GOOD:
 		break;
 	case SAM_STAT_CHECK_CONDITION:
-		condlog(2, "%s: Sense_Key=%02x, ASC=%02x ASCQ=%02x",
+		condlog(3, "%s: Sense_Key=%02x, ASC=%02x ASCQ=%02x",
 			dev, Sensedata->Sense_Key,
 			Sensedata->ASC, Sensedata->ASCQ);
 		switch(Sensedata->Sense_Key) {
@@ -471,11 +471,11 @@ int mpath_isLittleEndian(void)
 	int num = 1;
 	if(*(char *)&num == 1)
 	{
-		condlog(2, "Little-Endian");
+		condlog(4, "Little-Endian");
 	}
 	else
 	{
-		condlog(2, "Big-Endian");
+		condlog(4, "Big-Endian");
 	}
 	return 0;
 }
Signature · 1 line
2.16.1
maintainer Reviewed-by on the v1 series
#5 lore raw
In reply to Martin Wilck
Quoted 3 lines · Martin Wilck

This patch set decreases the log level of some messages that we see often time and that aren't usually helpful for debugging.

for the set.

Quoted 15 lines

Martin Wilck (4):
multipathd: decrease log level of "spurious uevent" message
libmultipath: decrease log level of uevent filter/merge messages
multipathd: decrease log level of waiter thread start/stop msgs
libmpathpersist: decrease log level of various messages

 libmpathpersist/mpath_persist.c  |  2 +-
 libmpathpersist/mpath_pr_ioctl.c | 32 ++++++++++++++++----------------
 libmultipath/uevent.c            |  4 ++--
 multipathd/main.c                |  2 +-
 multipathd/waiter.c              |  4 ++--
 5 files changed, 22 insertions(+), 22 deletions(-)
Signature · 1 line
2.16.1