Skip to content

Commit

Permalink
Fix reading stats from /proc/{pid}/statm (#1308)
Browse files Browse the repository at this point in the history
  • Loading branch information
lithorus authored Sep 27, 2023
1 parent c1f335d commit baa122a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rqd/rqd/rqmachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit baa122a

Please sign in to comment.