EventGhost Watchdog

Questions and comments specific to a particular plugin should go here.
Post Reply
User avatar
kgschlosser
Site Admin
Posts: 4316
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

EventGhost Watchdog

Post by kgschlosser » Fri May 25, 2018 7:55 pm

EventGhost Watchdog Timer
v0.2.0b

This has been an item that people have wanted for some time. It is highly experimental but i am so excited about it i figured what the hell and decided to release it.

FOLLOW THE INSTRUCTIONS

This is only going to work with a special build of EventGhost (for the time being) The were come modifications that needed to be made to the core to allow it to operate properly. (and it hopefully fixed other outstanding issues at the same time).

You can get this version of EG by following this link EventGhost_WIP-2018.05.25-17.43.19_Setup.exe

You are going to need to run EventGhost as an administrator and then add the plugin to your tree. This is the only time this is going to have to be done The reason for this is there is a symbolic link that has to be created to point to some files in the EG installation that are used to allow it to run.

You only have to run EG as administrator the one time.

The watchdog timer monitors the 3 core EventGhost threads. which is the thread for the GUI , the Action Thread and the Event Thread. if the test fails it is going to restart EventGhost. what will cause a failure is if the thread does not respond for a period of time that you set in the plugin config.

There are 3 tests you can run to ensure the watchdog is running.

gui thread test

Code: Select all

def do():
    while True:
        pass

wx.CallAfter(do)
event thread test

Code: Select all

def do():
    while True:
        pass
        
eg.eventThread.Call(do)

and the action thread

Code: Select all

def do():
    while True:
        pass
        
eg.actionThread.Call(do)

there is a log that is created %appdata%\eventghost\watchdog_log.txt this log file at the moment is always created. i have not put into place something to watch the size of the logfile. so please be aware of it. i do not want someone to have a drive that is full because of a logfile. so be aware.

The whole plugin format is a test to see if this whole thing works. and if it does expect to see it added to the core. This is a HUGE step in making EG a HA solution they are able to count on operating all the time.

FOLLOW THE INSTRUCTIONS

NEW VERSION.

v0.1.1b
Handles logging issue. If you have debugging enabled in EG the watchdog will also write to it's own log file. and if you disable it same goes in the watchdog.

Added some performance data output when debugging gets enabled
Added a PASSED/FAILED for each of the thread checks.
Fixed blank line output in debug log.

v0.2.0b
Added setting the thread check timeout time
Added setting the watchdog timeout, which is the duration of time that can pass between responses.
Added automatic restarting of the WatchdogTimer process. if it gets hung or terminated it will automatically restart.
Attachments
Watchdog-0.2.0b.egplugin
(24.52 KiB) Downloaded 32 times
Watchdog-0.1.1b.egplugin
(24 KiB) Downloaded 30 times
Watchdog-0.1b.egplugin
(23.61 KiB) Downloaded 33 times
If you like the work I have been doing then feel free to Image

Post Reply