Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchdog: improve dlt watchdog #470

Merged
merged 1 commit into from
May 22, 2023

Conversation

alexmohr
Copy link
Contributor

  • watchdog can be configured to notify systemd only if messages are received
  • activate this via:
    • -DWITH_SYSTEMD_WATCHDOG_ENFORCE_MSG_RX=ON
    • -DWITH_SYSTEMD_WATCHDOG_ENFORCE_MSG_RX_DLT_SYSTEM=ON

The program was tested solely for our own use cases, which might differ from yours.
Licensed under Mozilla Public License Version 2.0

Alexander Mohr, [email protected], Mercedes-Benz Tech Innovation GmbH, imprint

@alexmohr alexmohr force-pushed the improve-watchdog branch 3 times, most recently from c9732e5 to 6db855b Compare April 24, 2023 14:37
@michael-methner
Copy link
Collaborator

Hello @alexmohr ,
thank you for the proposal, but I disagree with the feature.
In my point of view, the trigger of the watchdog should only indicated that dlt-deamon and dlt-system is still in normal operation. Relying in the receiving of log messages to trigger the watchdog may have unintended side effects. clients should instead implement a own watchdog mechanism and not rely on DLT for this.

So I tend to not merge this change. Sorry.

@alexmohr
Copy link
Contributor Author

alexmohr commented May 5, 2023

I do agree that clients should not rely on this mechanism as watchdog. This change just makes sure that data of any application is still sent to daemon.
In our project an absence of logs, even for a few seconds, means that something is wrong with the daemon or dlt-system, because a very large number of logs is processed each seconds.
Absence of them does not mean an application is not working anymore but the system / daemon itself has an issue that prevents the processing of logs.
Therefore it improves that watchdog of the daemon and system in way that makes logs are actually processed / received and not some timer is still working.
The operation of the later does not at all indicate if the service is still working properly.

We do have different targets though, and it's disabled on some of them.

@michael-methner
Copy link
Collaborator

Hello @alexmohr ,
thank you for the explanation. I am willing to merge this feature but I would have like to have some modifications:

  1. Please document the two switches in doc/dlt_build_options.md
  2. Please add a option() in CmakeLists.txt above the change and a message() for the flag. Default should be "off"

@alexmohr alexmohr force-pushed the improve-watchdog branch 2 times, most recently from 61d4861 to d7ac962 Compare May 17, 2023 14:51
* watchdog can be configured to notify systemd
  only if messages are received
* this can activated via -DWITH_SYSTEMD_WATCHDOG_ENFORCE_MSG_RX=ON

Signed-off-by: Alexander Mohr <[email protected]>
@alexmohr
Copy link
Contributor Author

Hello @alexmohr , thank you for the explanation. I am willing to merge this feature but I would have like to have some modifications:

1. Please document the two switches in doc/dlt_build_options.md

2. Please add a option() in CmakeLists.txt above the change and a message() for the flag. Default should be "off"

Done and done 👍

@michael-methner michael-methner merged commit 61b1206 into COVESA:master May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants