NHC loglevels?

10 views
Skip to first unread message

Belgin, Mehmet

unread,
Jul 16, 2018, 2:01:16 PM7/16/18
to n...@lbl.gov, Belgin, Mehmet
Dear all, 

I couldn’t find anything in the documentation about setting different log levels. Is there a way to report only the errors? 

Even when I set:

   * || export SILENT=1 

(assuming this would disable logging altogether), I’m seeing a new line in the log every 2 minutes even for a healthy node. E.g.:

...
20180706 16:28:38 [pbs] /usr/libexec/nhc/node-mark-online devel7-vm-comp1.pace.gatech.edu
/usr/libexec/nhc/node-mark-online:  Skipping free node devel7-vm-comp1.pace.gatech.edu ( )
20180706 16:30:45 [pbs] /usr/libexec/nhc/node-mark-online devel7-vm-comp1.pace.gatech.edu
/usr/libexec/nhc/node-mark-online:  Skipping free node devel7-vm-comp1.pace.gatech.edu ( ) 

The log file is already too long and it’s getting out of control ;) I must be missing something. Any suggestions?

Thanks,
-Mehmet



---
Mehmet Belgin, Ph.D. 
Research Facilitation Lead
Partnership for an Advanced Computing Environment (PACE)
Georgia Institute of Technology
258 4th Street NW, Rich Building, #326 
Atlanta, GA  30332-0700
(404) 385-0665



Michael Jennings

unread,
Jul 16, 2018, 3:52:59 PM7/16/18
to LBNL Node Health Check, Belgin, Mehmet
On Fri, Jul 6, 2018 at 2:44 PM, Belgin, Mehmet
<mehmet...@oit.gatech.edu> wrote:

> I couldn’t find anything in the documentation about setting different log
> levels. Is there a way to report only the errors?

NHC doesn't have "loglevels" per se, but the purpose of "quiet" mode
(SILENT=1) is, indeed, to only report errors.

> Even when I set:
>
> * || export SILENT=1
>
> (assuming this would disable logging altogether), I’m seeing a new line in
> the log every 2 minutes even for a healthy node. E.g.:
>
> ...
> 20180706 16:28:38 [pbs] /usr/libexec/nhc/node-mark-online
> devel7-vm-comp1.pace.gatech.edu
> /usr/libexec/nhc/node-mark-online: Skipping free node
> devel7-vm-comp1.pace.gatech.edu ( )
> 20180706 16:30:45 [pbs] /usr/libexec/nhc/node-mark-online
> devel7-vm-comp1.pace.gatech.edu
> /usr/libexec/nhc/node-mark-online: Skipping free node
> devel7-vm-comp1.pace.gatech.edu ( )
> …
>
> The log file is already too long and it’s getting out of control ;) I must
> be missing something. Any suggestions?

Hmmm, that's an interesting point. I never really thought about that;
the log output from the online/offline node helpers is not currently
silence-able, and that's probably a bug. Feel free to file an issue
on GitHub for this, and if you're feeling up to it, a PR would be
helpful too! :-)

As a temporary workaround, the output of the helper scripts can be
suppressed using:
ONLINE_NODE="/usr/libexec/nhc/node-mark-online >/dev/null 2>&1"
OFFLINE_NODE="/usr/libexec/nhc/node-mark-offline >/dev/null 2>&1"

The "correct" fix is most likely to check $SILENT and $VERBOSE in the
helper scripts, which is (obviously) a code change. Feel free to take
a crack at it if you'd like!

Michael

--
Michael Jennings (KainX) https://medium.com/@mej0/ <m...@eterm.org>
Linux/HPC Systems Engineer, LANL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"The trouble with doing something right the first time is that nobody
appreciates how difficult it was." -- Walt West
Reply all
Reply to author
Forward
0 new messages