SXP Service Watcher
This program allows to automatically restart the SXP service provided by GSD Software by observing the log directory of the SXP service. If the SXP service is stuck, then log files of a specific type are being created that can be used as an indicator that the service is hanging.
Configuration
The configuration file config.toml MUST be within the same folder as the executable.
periodis given as seconds and determines the interval in which the destination log folder is checked. Default: 30 seconds.watch_diranddirMUST be absoluteservice_nameis the name of the target service to be restartedwatch_file_prefixis the prefix of the log files that are created by the SXP servicewatch_file_sizeis the size in kB of the created log files to be checked. Default: 0 kB
Installation
This program is written as a windows service that can be registered by using the script register.ps1.
Steps:
- Move the built target executable along with the configuration file
config.tomlandregister.ps1to your desired destination folder. - Start PowerShell as Administrator
- Navigate to the folder of step 1.
- Configure config.toml
- Run
./register.ps1within opened PowerShell of Step 1
Error handling
A log file called sv_file_watcher.log is created in the same path as the executable. Use the content of this log file to communicate errors.
Description
Languages
Rust
84.2%
PowerShell
15.8%