From baa122a033420258d9488dacc4364da6d4c42ddb Mon Sep 17 00:00:00 2001 From: Jimmy Christensen Date: Wed, 27 Sep 2023 22:26:44 +0200 Subject: [PATCH] Fix reading stats from /proc/{pid}/statm (#1308) --- rqd/rqd/rqmachine.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rqd/rqd/rqmachine.py b/rqd/rqd/rqmachine.py index 2fc5a32ce..65061ef82 100644 --- a/rqd/rqd/rqmachine.py +++ b/rqd/rqd/rqmachine.py @@ -216,7 +216,9 @@ def __updateGpuAndLlu(self, frame): def _getStatFields(self, pidFilePath): with open(pidFilePath, "r") as statFile: - return [None, None] + statFile.read().rsplit(")", 1)[-1].split() + stats = statFile.read().split() + stats[1] = stats[1].strip('()') + return stats def rssUpdate(self, frames): """Updates the rss and maxrss for all running frames"""