hubblo-org / scaphandre

⚡ Energy consumption metrology agent. Let "scaph" dive and bring back the metrics that will help you make your systems and applications more sustainable !
Apache License 2.0
1.54k stars 101 forks source link

Proper handling of Windows service management #336

Open bpetit opened 1 year ago

bpetit commented 1 year ago

Problem

Scpahandre only runs on windows as a bare executable. To use it as a daemon it needs to integrate with windows service management (sc.exe).

Solution

Integrate windows service events management in scaphandre, when compiled for and used on windows.

This crate may help : https://docs.rs/windows-service/latest/windows_service/

bpetit commented 5 months ago

Start works fine.