-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not init disabled plugins (need discussion) #2775
Comments
For the moment all plugins are initialized (even if they are disabled in the configuration file). Only enabled plugins are updated. The error is raised durin the initialisation. |
I'm guessing that means that further down the track, as code is further optimized, it would be possible to only initialize enabled plugins which would (in theory) also speed start up, reduce memory footprint, etc.? |
Correct but a "disabled" plugin can be enable during execution (for example by pressing 'D' hotkey for the containers plugin). So in this case, the plugin should be initialized in the loop... We have to think about it, but the proposal is interresting. cc: @RazCrimson |
Ahh... yep, OK. |
Currently, all plugins are initialized irrespective of them being disabled or enabled. Instead of initializing at start, maybe we could dynamically attempt a initialization when the plugin gets enabled. This would make show/hide on the screen quite more laggy/slow than it currently is. I think this could get more complicated though. Like in cases with containers, the You may think that we should stop the plugin after the daemon gets shutdown. But if the daemon starts back again, you would get not the stats in that case. So it gets very nuanced in certain situations as to what needs to be done 🤔 |
Describe the bug
On Glances 4.0.4 start-up, and the following error is logged:
ERROR -- containers (Docker) plugin - Can't connect to Docker (Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.'))
even though the containers plugin is disabled.
Glances continues to run without issue so low priority issue. It just seems odd that with the containers plugin disabled, it is obviously still trying to load something. Or is it just trying to detect whenther it is running within a Docker container on start-up and this is how it logs that failed detection?
To Reproduce
Steps to reproduce the behavior:
glances -w --fs-free-space --enable-process-extended --config %APPDATA%\glances\glances.conf
Expected behavior
no containers code loading and therefore no error logged
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information)
Windows Server 2016
Glances version: 4.0.4, PsUtil version: 5.9.8
Pypi package
Additional context
n/a
You can also pastebin:
the Glances configuration file
glances.conf.txt
the Glances log file (https://glances.readthedocs.io/en/latest/config.html#logging)
glances-Administrator.log
The text was updated successfully, but these errors were encountered: