Commit 0a582ead authored by Valentin Reis's avatar Valentin Reis

py3 updates.

parent d9e5aba3
Pipeline #7946 failed with stages
in 4 minutes
......@@ -96,6 +96,7 @@ class coretemp_reader:
self.coretemp[0] = cti
else:
self.coretemp[pkgid] = cti
print(self.coretemp)
def readtempall(self):
ctemp = self.coretemp
......
......@@ -66,7 +66,7 @@ class cputopology:
return ret
def detect(self):
self.onlinecpus = self.parserange(self.cpubasedir + "online")
self.onlinecpus = self.parserange(self.cpubasedir + "online")[0]
self.pkgcpus = {}
for cpuid in self.onlinecpus:
......
......@@ -308,8 +308,8 @@ class Daemon(object):
# Calculate difference between the values
diff = self.sensor_manager.calc_difference(s, e)
# Get final package temperature
temp = self.machine_info["temperature"]
diff["temp"] = map(lambda k: temp[k]["pkg"], temp)
# temp = self.machine_info["temperature"]
# diff["temp"] = map(lambda k: temp[k]["pkg"], temp)
diff["policy"] = p["policy"]
if p["policy"]:
diff["damper"] = (
......
......@@ -28,7 +28,7 @@ def send(apiname):
model = loadschema("json", apiname)
def send(self, *args, **kwargs):
self.socket.send(json.dumps(model(dict(*args, **kwargs))))
self.socket.send_string(json.dumps(model(dict(*args, **kwargs))))
setattr(cls, "send", send)
......
......@@ -34,7 +34,7 @@ class SensorManager:
self.nodeconfig = nrm.coolr.clr_nodeinfo.nodeconfig()
self.nodename = self.nodeconfig.nodename
self.cputopology = nrm.coolr.clr_nodeinfo.cputopology()
self.coretemp = nrm.coolr.clr_hwmon.coretemp_reader()
# self.coretemp = nrm.coolr.clr_hwmon.coretemp_reader()
self.rapl = nrm.coolr.clr_rapl.rapl_reader()
self.msr = nrm.coolr.msr.Msr()
......@@ -47,7 +47,7 @@ class SensorManager:
def do_update(self):
machine_info = dict()
machine_info["energy"] = self.rapl.sample(accflag=True)
machine_info["temperature"] = self.coretemp.sample()
# machine_info["temperature"] = self.coretemp.sample()
machine_info["time"] = time.time()
return machine_info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment