Skip to content

Error in watchdogd when generic monitor script is enabled. #39

@troglobit

Description

@troglobit

Discussed in #38

Originally posted by senthilnthangaraj October 24, 2023
I've encountered an issue with the watchdogd service when attempting to activate a generic monitoring script. This particular script has a runtime exceeding one second, leading to the system ultimately rebooting.

Our configuration is as follows:

generic {
   enabled = true
   interval = 60
   timeout = 20
   warning  = 1
   critical = 10
   monitor-script = "/usr/sbin/my-script.sh"
}

The error message we're encountering reads:

"Monitor script PID 1057 is still running after 20 seconds.
watchdog: watchdog0: watchdog did not stop!"

Upon further investigation, I've identified that the problem lies in the fact that 'gs->script_runtime' is measured in milliseconds, while 'gs->script_runtime_max' is maintainted in seconds, as indicated by the source code here: link to source code.

This appears to be a bug that requires rectification. Kindly confirm if my assessment is accurate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions