title: Java Watchdog monitoring
body: <p>I am trying to develop a watchdog in java (windows and linux) who will operate in two ways:</p>
  
  <p>1) Passive monitoring.</p>
  
  <p>After the process finish his job, the watchdog need to check with which return value the process finished. (exit(1), exit(0)...)</p>
  
  <p>2) Active monitoring.</p>
  
  <p>The process need to "touch" a file who belongs to him every interval(x).
  The watchdog will check every interval (y) if the process "touch" his file by checking the file stamp.
  If the process didn't touch the file, the watchdog will try to send a signal to the process for touching the file.
  The active monitoring purpose is to kill processes with deadlock. </p>
  
  <p>The watchdog will start all the processes.</p>
  
  <p>1) How can I send the jvm of a process signal? one signal is a "reminder" for the process to touch the file.
  The other signal is to kill the process.</p>
  
  <p>2) How can I implement the idea on threads?</p>
  
  <p>3) There is any API in Java that I can use?</p>
  
  <p>Thanks</p>