Skip to content

Commit

Permalink
Explicitly show that ps gives memory in KiB
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed Aug 14, 2024
1 parent 3fca58b commit c75a8cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/con_duct/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,14 @@ def collect_sample(self) -> Sample:
)
for line in output.splitlines()[1:]:
if line:
pid, pcpu, pmem, rss, vsz, etime, cmd = line.split(maxsplit=6)
pid, pcpu, pmem, rss_kib, vsz_kib, etime, cmd = line.split(maxsplit=6)
sample.add_pid(
int(pid),
ProcessStats(
pcpu=float(pcpu),
pmem=float(pmem),
rss=int(rss) * 1024,
vsz=int(vsz) * 1024,
rss=int(rss_kib) * 1024,
vsz=int(vsz_kib) * 1024,
timestamp=datetime.now().astimezone().isoformat(),
),
)
Expand Down

0 comments on commit c75a8cc

Please sign in to comment.