--- atopgpud.orig 2019-01-12 16:37:19.000000000 -0600
+++ atopgpud 2019-09-05 10:40:24.909804909 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/python -Es
+#!/usr/bin/python3 -Es
# ==============================================================
# Daemon that gathers statistical information from all
@@ -181,7 +181,7 @@
self.stats.procstats[pid].memcum += proc.usedGpuMemory//1024
self.stats.procstats[pid].sample += 1
- if self.stats.tasksupport & ACCOUNT:
+ if self.stats.tasksupport & ACCOUNT:
try:
stats = pynvml.nvmlDeviceGetAccountingStats(self.gpuhandle, pid)
@@ -503,7 +503,7 @@
# active processes for
# this GPU
# ---------------------
- for pid, stat in s.procstats.items():
+ for pid, stat in list(s.procstats.items()):
strbuf += "#A {:d} {:d} {:d} {:d} {:d} {:d} {:d}".format(pid,
stat.gpubusy, stat.membusy, stat.timems,
stat.memnow, stat.memcum, stat.sample)
@@ -512,7 +512,7 @@
# terminated processes
# for this GPU
# ---------------------
- for pid, stat in cliterm[clisock].items():
+ for pid, stat in list(cliterm[clisock].items()):
strbuf += "#E {:d} {:d} {:d} {:d} {:d} {:d} {:d}".format(pid,
stat.gpubusy, stat.membusy, stat.timems,
stat.memnow, stat.memcum, stat.sample)