You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After podman version is updated to 5.0+, glances cannot monitor and the following error will appear
root@OpenWrt:~# podman logs glances
Exception in thread Thread-16 (__update_plugin):
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/usr/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "/app/glances/stats.py", line 258, in __update_plugin
self._plugins[p].update()
File "/app/glances/plugins/plugin/model.py", line 1151, in wrapper
ret = fct(self, *args, **kw)
^^^^^^^^^^^^^^^^^^^^^^
File "/app/glances/plugins/plugin/model.py", line 1168, in wrapper
ret = fct(*args, **kw)
^^^^^^^^^^^^^^^^
File "/app/glances/plugins/containers/__init__.py", line 223, in update
stats_podman = self.update_podman() if self.podman_extension else {}
^^^^^^^^^^^^^^^^^^^^
File "/app/glances/plugins/containers/__init__.py", line 245, in update_podman
version, containers = self.podman_extension.update(all_tag=self._all_tag())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/glances/plugins/containers/engines/podman.py", line 290, in update
container_stats = [self.generate_stats(container) forcontainerin containers]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/glances/plugins/containers/engines/podman.py", line 290, in<listcomp>
container_stats = [self.generate_stats(container) forcontainerin containers]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/glances/plugins/containers/engines/podman.py", line 328, in generate_stats
stats['cpu_percent'] = stats["cpu"]['total']
~~~~~~~~~~~~^^^^^^^^^
KeyError: 'total'
My temporary solution is to modify the content between the stats['cpu_percent'] field and the stats ['network_tx'] field of the last generate_stats function in the file /app/glances/plugins/containers/engines/podman.py, so that glances does not display the corresponding monitoring values. Can you tell me how to modify it so that it can be displayed correctly without errors? Thank you very much!
glances version: latest-full
podman version: 5.1.1
The text was updated successfully, but these errors were encountered:
After podman version is updated to 5.0+, glances cannot monitor and the following error will appear
My temporary solution is to modify the content between the
stats['cpu_percent']
field and the stats['network_tx']
field of the lastgenerate_stats
function in the file/app/glances/plugins/containers/engines/podman.py
, so that glances does not display the corresponding monitoring values. Can you tell me how to modify it so that it can be displayed correctly without errors? Thank you very much!glances version: latest-full
podman version: 5.1.1
The text was updated successfully, but these errors were encountered: