summaryrefslogtreecommitdiffstats
path: root/glances/plugins/containers/engines/podman.py
diff options
context:
space:
mode:
Diffstat (limited to 'glances/plugins/containers/engines/podman.py')
-rw-r--r--glances/plugins/containers/engines/podman.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/glances/plugins/containers/engines/podman.py b/glances/plugins/containers/engines/podman.py
index ccf4a566..ab016a9e 100644
--- a/glances/plugins/containers/engines/podman.py
+++ b/glances/plugins/containers/engines/podman.py
@@ -9,7 +9,7 @@
"""Podman Extension unit for Glances' Containers plugin."""
from datetime import datetime
-from glances.globals import iterkeys, itervalues, nativestr, pretty_date, string_value_to_float
+from glances.globals import iterkeys, itervalues, nativestr, pretty_date, string_value_to_float, replace_special_chars
from glances.logger import logger
from glances.plugins.containers.stats_streamer import StatsStreamer
@@ -139,7 +139,7 @@ class PodmanPodStatsFetcher:
def _get_memory_stats(self, stats):
"""Return the container MEMORY.
- Output: a dict {'rss': 1015808, 'cache': 356352, 'usage': ..., 'max_usage': ...}
+ Output: a dict {'usage': ..., 'limit': ...}
"""
if "MemUsage" not in stats or "/" not in stats["MemUsage"]:
self._log_debug("Missing MEM usage fields")
@@ -155,7 +155,7 @@ class PodmanPodStatsFetcher:
self._log_debug("Compute MEM usage failed", e)
return None
- return {"usage": usage, "limit": limit}
+ return {'usage': usage, 'limit': limit, 'inactive_file': 0}
def _get_network_stats(self, stats):
"""Return the container network usage using the Docker API (v1.0 or higher).
@@ -234,7 +234,7 @@ class PodmanContainersExtension:
# PodmanClient works lazily, so make a ping to determine if socket is open
self.client.ping()
except Exception as e:
- logger.error("{} plugin - Can't connect to Podman ({})".format(self.ext_name, e))
+ logger.debug("{} plugin - Can't connect to Podman ({})".format(self.ext_name, e))
self.client = None
def update_version(self):
@@ -334,7 +334,8 @@ class PodmanContainersExtension:
stats['network_rx'] = stats['network'].get('rx') // stats['network'].get('time_since_update')
stats['network_tx'] = stats['network'].get('tx') // stats['network'].get('time_since_update')
stats['uptime'] = pretty_date(started_at)
- stats['command'] = ' '.join(stats['command'])
+ # Manage special chars in command (see isse#2733)
+ stats['command'] = replace_special_chars(' '.join(stats['command']))
else:
stats['io'] = {}
stats['cpu'] = {}