ndctl/monitor: make the daemon exit message 'info' level
Vishal Verma
maintainerPATCH 1/1 ndctl/monitor: make the daemon exit message 'info' level
The 'ndctl monitor daemon started' message is at an 'info' log level, but the corresponding exit message (if no DIMMs are found for monitoring) was only at a 'debug' level. As a result, on a system without NVDIMMs, the sysadmin might see a 'monitor started' message, but a monitor wouldn't actually be running. Making the exit message the same log level ensures that no confusion arises out of this.
--- ndctl/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ndctl/monitor.c +1 -1
@@ -646,7 +646,7 @@ int cmd_monitor(int argc, const char **argv, struct ndctl_ctx *ctx) goto out;if (!mfa.num_dimm) { -dbg (&monitor,"no dimms to monitor\n" ); +info (&monitor,"no dimms to monitor, exiting\n" );if (!monitor.daemon) rc = -ENXIO ; goto out;
Signature · 6 lines
2.20.1 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 38 lines
-----Original Message-----
From: Vishal Verma [mailto:[email protected]]
Sent: Friday, August 2, 2019 6:19 AM
To: [email protected]
Cc: Vishal Verma <[email protected]>; Qi, Fuli/斉 福利 <[email protected]>; Dan Williams <[email protected]>; Adam Borowski <[email protected]>
Subject: [ndctl PATCH] ndctl/monitor: make the daemon exit message 'info' levelThe 'ndctl monitor daemon started' message is at an 'info' log level, but the corresponding exit message (if no DIMMs are found for monitoring) was only at a 'debug' level. As a result, on a system without NVDIMMs, the sysadmin might see a 'monitor started' message, but a monitor wouldn't actually be running. Making the exit message the same log level ensures that no confusion arises out of this.
Cc QI Fuli <[email protected]>Cc Dan Williams <[email protected]>Reported-by Adam Borowski <[email protected]>Signed-off-by Vishal Verma <[email protected]>--- ndctl/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)ndctl/monitor.c +1
-1@@ -646,7 +646,7 @@ int cmd_monitor(int argc, const char **argv, struct ndctl_ctx *ctx) goto out;if (!mfa.num_dimm) { -dbg (&monitor,"no dimms to monitor\n" ); +info (&monitor,"no dimms to monitor, exiting\n" );if (!monitor.daemon) rc = -ENXIO ;
Quoted 3 lines
goto out;
--
2.20.1
Hi Vishal,
This looks good to me.
Thank you very much.
QI Fuli
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm