Questions tagged [watchdog]

Watchdog and watchdog timers.

Watchdog / watchdog timer is mechanism built-in in the system on hardware or software level can reset the system if serious problems are detected.

External links that are helpful when working on watchdog:

555 questions
12
votes
3 answers

Disabling the STM32 IWDG during debugging

I have a ChibiOS 3.x program on a STM32F4 microcontroller where I use the IWDG watchdog to reset the MCU on errors like this: int main() { iwdgInit(); iwdgStart(&IWDGD, &wd_cfg); while(true) { // ... do stuff } } If I now…
Uli Köhler
  • 13,012
  • 16
  • 70
  • 120
12
votes
1 answer

ImportError: No module named observers after installed watchdog

Im trying to run official watchdog simple example after installing the watchdog module using pip: pip install watchdog, and i get an error: from watchdog.observers import Observer ImportError: No module named observers Can someone please help me?
scythargon
  • 3,363
  • 3
  • 32
  • 62
11
votes
2 answers

Writing a file with vim doesn't fire a file change event on OS X

I am using watchdog to monitor .less file change events on OS X. If I change the contents of a .less file with TextMate or Sublime Text the modification event is captured. However, if I edit the content with vim no file modification event is fired…
John Keyes
  • 5,479
  • 1
  • 29
  • 48
11
votes
3 answers

How to implement a watchdog timer in Python?

I would like to implement a simple watchdog timer in Python with two use cases: Watchdog ensures that a function doesn't execute longer than x seconds Watchdog ensures that certain regularly executed function does indeed execute at least every y…
Sergiy Belozorov
  • 5,856
  • 7
  • 40
  • 73
10
votes
1 answer

How and on what condidtions are FCM high-priority messages de-prioritized? How to fetch cached FCM messages from server?

According to FCM documentation high-priority messages might become de-prioritized, if the FCM server detects a pattern in which high-priority messages do not result into user interactions. The details of this mechanism are left unspecified.…
10
votes
2 answers

watchdog: Device or resource busy

I'm trying to feed the watchdog device - /dev/watchdog in Raspbian - from C. The problem is no matter how i try to access the device always throws busy or permission denied errors (as the process is already running and being fed by the…
TMichel
  • 4,336
  • 9
  • 44
  • 67
10
votes
2 answers

combining python watchdog with multiprocessing or threading

I'm using Python's Watchdog to monitor a given directory for new files being created. When a file is created, some code runs that spawns a subprocess shell command to run different code to process this file. This should run for every new file that…
havok2063
  • 517
  • 2
  • 9
  • 25
10
votes
2 answers

Monitoring a single file

I need to monitor (using watchdog) a single file, not a whole directory. What is the best way to avoid monitoring a whole directory? I suppose this class watchdog.events.PatternMatchingEventHandler(patterns=None, ignore_patterns=None,…
Tom Cruise
  • 509
  • 1
  • 6
  • 10
9
votes
4 answers

Foolproof cross-platform process kill daemon

I have some python automation, which spawns telnet sessions that I log with the linux script command; there are two script process IDs (a parent and child) for each logging session. I need to solve a problem where if the python automation script…
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
9
votes
3 answers

Task watchdog got triggered - The tasks did not reset the watchdog in time

I am trying to write a little asynchronous WebServer. Let me briefly describe the scenario: My ESP32 as well is a router. So if I connect with my mobile phone into the WiFi the ESP32 is spreading and call the ip address and a special path with a…
Sam
  • 145
  • 1
  • 1
  • 12
9
votes
4 answers

Detect when parent process exits

I will have a parent process that is used to handle webserver restarts. It will signal the child to stop listening for new requests, the child will signal the parent that it has stopped listening, then the parent will signal the new child that it…
700 Software
  • 85,281
  • 83
  • 234
  • 341
9
votes
4 answers

Can I create a software watchdog timer thread in C++ using Boost Signals2 and Threads?

I am running function Foo from somebody else's library in a single-threaded application currently. Most of the time, I make a call to Foo and it's really quick, some times, I make a call to Foo and it takes forever. I am not a patient man, if Foo…
Aron Ahmadia
  • 2,267
  • 2
  • 19
  • 22
8
votes
2 answers

Watchdog (osx) not notifying on remote network changes

I'm using Watchdog to monitor a network directory, non-recursive, for a specific pattern of files to be created over time. The issue I am seeing is that while it works fantastic when I test locally, if I make changes to the monitored directory from…
jdi
  • 90,542
  • 19
  • 167
  • 203
8
votes
4 answers

Python - Have parent thread handle child threads Exception

Is there a way to have the parent that spawned a new thread catch the spawned threads exception? Below is a real basic example of what I am trying to accomplish. It should stop counting when Exception is raised, but I don't know how to catch it. …
Das.Rot
  • 638
  • 4
  • 11
  • 25
8
votes
1 answer

How to run a specific program before systemd's watchdog stops a service

I have a program which is run by systemd with a service file like this: [Unit] Description=... [Service] Type=notify ExecStart=/usr/sbin/myprogram WatchdogSec=1 KillMode=process KillSignal=SIGTERM Restart=always It sends the respective signal to…
jotrocken
  • 2,263
  • 3
  • 27
  • 38
1
2
3
36 37