Skip to content

Support signal(s) to NUT daemons to manage debug level #1202

@jimklimov

Description

@jimklimov

One neat idea recently proposed was to support in all our codebase that can do upsdebugx() (so probably via common.c) some dedicated signals consistently:

  • either several signals to set specific debug level numbers in a running process (typically daemon like upsd, driver, upsmon; might be a long-running nut-scanner however e.g. to see if it is stuck on something or just a walk takes long),
  • or a couple of signals to dial the verbosity up (any limit?) or down (stop at 0),
  • or a single signal to dial 0-1-2-3-4-5(-6-...?)-0 which is a bit less reliable as we did not guarantee that the max verbosity is 5 or 6 across the board (some code had debugs at level 10 or so),
  • and/or possibly augment the two dialing options above with a dedicated signal to hush the verbosity to 0 quickly.

The first idea with dedicated signals for each debug level may be problematic as we might have no top limit on verbosity (5? more?) and the amount of SIGUSR's may be limited in different OSes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    service/daemon start/stopGeneral subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions