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:

475 questions
188
votes
2 answers

How can I verify if a Windows Service is running

I have an application in C# (2.0 running on XP embedded) that is communicating with a 'watchdog' that is implemented as a Windows Service. When the device boots, this service typically takes some time to start. I'd like to check, from my code, if…
edosoft
  • 16,270
  • 24
  • 75
  • 108
152
votes
16 answers

Run cron job only if it isn't already running

I'm trying to set up a cron job as a sort of watchdog for a daemon that I've created. If the daemon errors out and fails, I want the cron job to periodically restart it... I'm not sure how possible this is, but I read through a couple of cron…
LorenVS
  • 11,817
  • 9
  • 43
  • 54
61
votes
3 answers

watchdog monitoring file for changes

I have a need to watch a log file for changes. After looking through stackoverflow questions, I see people recommending watchdog. So I'm trying to test, and am not sure where to add the code for when files change: import time from…
Cmag
  • 12,570
  • 23
  • 75
  • 129
29
votes
3 answers

About Linux NMI watchdog

Now I encounter a problem about Linux NMI Watchdog. I want to use Linux NMI watchdog to detect and recovery OS hang. So, I add "nmi_watchdog=1" into grub.cfg. And then check the /proc/interrupt, NMI were triggered per second. But after I load a…
silverbullettt
  • 768
  • 1
  • 9
  • 12
26
votes
4 answers

What's the best way to watchdog a desktop application?

I need some way to monitor a desktop application and restart it if it dies. Initially I assumed the best way would be to monitor/restart the process from a Windows service, until I found out that since Vista Windows services should not interact…
Axel Magagnini
  • 829
  • 1
  • 8
  • 17
22
votes
2 answers

Detect file creation with watchdog

I am trying to detect when a file with a given name is created in a directory. I am doing it thanks to watchdog. The creation is correctly detected but I don't know how to terminate the application properly once the detection is done. My piece of…
Laurent
  • 12,925
  • 13
  • 47
  • 75
20
votes
9 answers

How to use Linux software watchdog?

Can anybody tell me how to handle the software watchdog in Linux? I have a program SampleApplication which runs continuously and I need to restart it if its hangs or closes unexpectedly. I was Googling about this and found Linux has watchdog at…
Verve Innovation
  • 1,886
  • 6
  • 26
  • 48
17
votes
5 answers

Who is refreshing hardware watchdog in Linux?

I have a processor AT91SAM9G20 running a 2.6 kernel. Watchdog is enabled at bootstrap level and configured for 16 seconds. Watchdog mode register can be configured only once. When code hangs either in bootstrap, bootloader or kernel, the board…
Shashikiran
  • 199
  • 1
  • 3
  • 8
15
votes
5 answers

How to use the watchdog timer in a RTOS?

Assume I have a cooperative scheduler in an embedded environment. I have many processes running. I want to utilize the watchdog timer so that I can detect when a process has stopped behaving for any reason and reset the processor. In simpler…
user946230
  • 239
  • 1
  • 3
  • 8
14
votes
3 answers

From userspace, how can I tell if Linux's soft watchdog is configured with no way out?

I am writing a system monitor for Linux and want to include some watchdog functionality. In the kernel, you can configure the watchdog to keep going even if /dev/watchdog is closed. In other words, if my daemon exits normally and closes…
Tim Post
  • 32,014
  • 15
  • 104
  • 162
14
votes
4 answers

Generating multiple observers with Python watchdog

I currently have a basic functioning script that monitors a single directory and all sub-directories below for changes and passes the output to the LoggingEventHandler. I now want to expand my script to monitor 3 separate locations but I simply…
binarydogs
  • 143
  • 1
  • 7
13
votes
1 answer

Watchdog and matplotlib: Processing an image and displaying results when a new file comes in directory

I am trying to create a simple app in which an image is pushed in a directory (by an outside process) Python watchdog triggers and the image is processed by a function and results are displayed in a window The job is continuously running and the…
user262540
  • 391
  • 1
  • 3
  • 6
13
votes
2 answers

How to run an function when anything changes in a dir with Python Watchdog?

I'm trying to use watchdog to run a sync script whenever anything changes in a dir (except for one specific file). I simply copied the code from the readme (pasted below), which does what it says; log which file has changed. import sys import…
kramer65
  • 39,074
  • 90
  • 255
  • 436
13
votes
2 answers

what is the difference between hardware watchdog and software watchdog?

what is the difference between hardware watchdog and software watchdog ?
M Sharath Hegde
  • 435
  • 1
  • 6
  • 20
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
  • 2,750
  • 3
  • 23
  • 49
1
2 3
31 32