shirou / gopsutil

psutil for golang
Other
10.47k stars 1.58k forks source link

Standart interfaces for services #1550

Closed acul009 closed 2 months ago

acul009 commented 10 months ago

Is your feature request related to a problem? Please describe. I'm currently building a small monitoring system. I want to be able to list and manage services running on my systems. It seems like currently only windows services are supported. My problem is, that I can't program a future proof service management with a specific IP

Describe the solution you'd like I would be interested in a set of interfaces and shared structs which could then be used to add support for more platforms later. If I have the time I could even try a basic implementation for systemd. But the beauty of this project is the platform independence and I'd love to build on that.

Describe alternatives you've considered I could instead build my own solution, but since I'm using this project, I'd like to give back a little.

TLDR: I'd love some predefined interfaces and structs so I could implement basic systemd service managment on top.

shirou commented 10 months ago

I have implemented winservices because psutil has the feature. However, I personally think that this feature is different from other psutil features and should be separate as a separate library package.

I think it would be useful to have a library that can handle various OS services in a unified interface, including systemd service, etc. Therefore, if you are going to create a library, I would like to support it.

shirou commented 2 months ago

Close for not updating. Feel free to reopen if you have more questions.