nicolargo / glances

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
http://nicolargo.github.io/glances/
Other
26.3k stars 1.49k forks source link

Autostart on Port Access #2927

Open justbest23 opened 3 weeks ago

justbest23 commented 3 weeks ago

The only issue I have is that Glances uses quite a bit of system resources. It's not a crazy amount, but I feel it's enough to warrant me not wanting it to run full time.

Add functionality so that the glances (specifically glances -w in my case) is only started when I access the assigned port (61208 by default). It should also kill the process if the port is not being accessed.

I've tried to do this with systemd sockets but it seems to be a bit beyond my comprehension level.

Thanks!!

nicolargo commented 2 weeks ago

Hi @justbest23

what kind of resources do you want to reduce ?

On my system when i ran Glances -w with no client, the CPU consumption is very low:

image

0.2% of 1 Core == 0,0125 of my CPU Socket (16 Core).