Is it safe to disable watchdog.sh?

I have never enabled data collection. It looks like /usr/bin/watchdog.sh being continuously executed by cron. And that is in turn spamming /var/log/messages with warning watchdog[]: Restarted nethist.

I would like to disable this log spam. Thanks.

1 Like

Hi @darwin; did you find a solution for turning off this "warning watchdog[]: Restarted nethist"
message? I have got the same issue and no solution yet. What is this nethist process for anyhow?

1 Like

Well, it is pretty easy to disable a cron job. This particular one is located at /etc/cron.d/watchdog. You can rename it to /etc/cron.d/watchdog.disabled or use some other technique. Unfortunately there seems to be no safe way how disable it and teach auto-updater not to mess with it again[1].

My question was about consequences of such action. From the script /usr/bin/watchdog.sh one can read that it keeps processes nethist, lcollect and ucollect alive. But I’m not sure how the whole system works and if it is safe just let them die. Nethist probably stands for “network history” and it collects various metrics of your network connections.

And now I have another log spam:

2016-12-01T16:54:01+01:00 info cron[22026]: (root) CMD (/usr/bin/rootkeys_backup.sh)
2016-12-01T16:54:01+01:00 info cron[22027]: (root) CMD (/usr/bin/rainbow_button_sync.sh)
2016-12-01T16:54:01+01:00 info cron[22023]: (root) MAIL (mailed 755 bytes of output but got status 0x0001

Every 2 minutes rootkeys_backup.sh decides to do some backup and email probably fails.

Anyone else seeing this? Why it is not documented in those scripts why is this thing necessary and what is its purpose? Why is email involved?

[1] http://serverfault.com/questions/150348/robustly-disabling-specific-cron-hourly-daily-weekly-script

As a temporary solution I have redirected all cron logging into a separate file:

Could do this with other log spam as well. But I would rather prefer to resolve the root cause.

Good question. I am wondering the same thing. I dont use data collecting, so I think I dont need nethist / collect.

However, watchdog includes also watching kresd, which is good thing. So I think our problem is nonconfigured relation between updater (it know, that you dont install collectd) and watchdog setting.

I would really like to remove nethist from watchable state, but as darwin say, need confirmation by developers…

If nethist is/was disabled, it shouldn’t be restarted: https://gitlab.labs.nic.cz/turris/misc/blob/master/watchdog/watchdog.sh#L51

Good point. Then I would have two questions:

  • Is nethist really neeeded? I mean as core function. I dont have problem with leaving it enabled, but I would like to know, if some of turris package/os isnt dependent on that. If its really only for hyphotetic installation of collectd/majordomo, I would like to disable it as I dont use statistic. But I am not sure, if its not used for LuCI realtime graphs for example… dont know.

  • Why its keeping been restarted all the time (when its enabled)? Is there some problem with runtime, or its false alarm of monitoring? I seen quite a lot logs from turris users, so I am sure I am not only one, and I can confirm I have pretty basic configuration, whithout any complex/additional packages installed on top of Omnia. Unfortunatelly I dont see much info about that on kernel/system log, and dont know, how to debug nethist.

Btw., https://github.com/CZ-NIC/turris-os-packages/pull/26. Hope they will pick this one.