Git Product home page Git Product logo

tdwatchdog's Introduction

TDWatchdog

The main program window

Main Window

TouchDesigner component for script communication

TouchDesigner Component

  • Ping every (how often it should send a ping to the watchdog server)
  • Reset errors (it would reset the error count if the installation is running without errors)
  • Max errors (how many errors can the installation have before it stops sending ping)

TDWatchdog is a simple Python script that can handle logging and status for the installations.

Usage

  1. Download the release
  2. Start TDWatchdog.exe to launch the app
  3. Modify settings.json to configure the application settings.
  4. Utilize the TD folder for the TouchDesigner component, which facilitates script communication. This component can be customized based on the installation's status, such as checking sensors or local errors.

Settings file

{
  "app": "C:/path/to/your/application.exe",
  "args": ["-arg1", "-arg2"],
  "ports": [8000, 8005],  // Ports for the watchdog server and the TouchDesigner component (now it would listen to the second port)
  "ping_time": 10,        // How often it would wait before triggering the timeout
  "wait": 20,             // How long it would wait after starting the application before starting listening for pings
  "reboot": 3,            // How many times it would restart the application before rebooting the system, 0 for infinite
  "autostart": true       // Whether it should start the application on the service start
}

Functionality

  • Reads settings and launches the application with specified arguments.
  • Automatically restarts the application if no ping is received.
  • Restart the system if the application error count exceeds the maximum limit.
  • Adds or removes itself from system startup.
  • Provides robust logging of application status.
  • Keep only one instance of the app, preventing 'double launching' that could be critical for hardware access and control.

Planned Features

  • Monitoring multiple applications.
  • Remote system management (start, reboot, shutdown).
  • Remote system monitoring.
  • Integration with APIs for online status reporting (e.g., PM2).

Development

Run to install the required packages.

install.bat

Use compile script to compile to executable file

compile.bat

License

This project is licensed under the MIT License

tdwatchdog's People

Contributors

ajasra avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.