aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hoffmann <volker@cheleb.net>2016-11-01 09:38:40 +0100
committerVolker Hoffmann <volker@cheleb.net>2016-11-01 09:53:23 +0100
commit8178da6f07177376064c4c4c31830d2cb37cb82f (patch)
treedb67b65914f9a1feb2a8bf16ff272c6010baaf47
parentfc9f044a650f71f5b8dbcfc6b5130ad60e3c5222 (diff)
fix: skip intermediate variables for lines
-rw-r--r--ticker.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/ticker.py b/ticker.py
index a7dd3ea..67a1001 100644
--- a/ticker.py
+++ b/ticker.py
@@ -79,18 +79,14 @@ lines.append(line)
for gpu_node in [ 'vesta1', 'vesta2' ]:
df, gpu_epoch, sucess = nvidia.read_gpu_stats(node=gpu_node, type='tesla')
for irow, [ index, row ] in enumerate(df.iterrows()):
- line_01 = "gpu_temperature,node=%s,uuid=%s value=%.2f %i" % \
- (row.node, row.uuid, row.gpu_temperature, gpu_epoch)
- line_02 = "gpu_power_draw,node=%s,uuid=%s value=%.2f %i" % \
- (row.node, row.uuid, row.power_draw, gpu_epoch)
- line_03 = "gpu_utilization,node=%s,uuid=%s value=%.2f %i" % \
- (row.node, row.uuid, row.gpu_utilization, gpu_epoch)
- line_04 = "gpu_memory_utilization,node=%s,uuid=%s value=%.2f %i" % \
- (row.node, row.uuid, row.memory_utilization, gpu_epoch)
- lines.append(line_01)
- lines.append(line_02)
- lines.append(line_03)
- lines.append(line_04)
+ lines.append("gpu_temperature,node=%s,uuid=%s value=%.2f %i" % \
+ (row.node, row.uuid, row.gpu_temperature, gpu_epoch))
+ lines.append("gpu_power_draw,node=%s,uuid=%s value=%.2f %i" % \
+ (row.node, row.uuid, row.power_draw, gpu_epoch))
+ lines.append("gpu_utilization,node=%s,uuid=%s value=%.2f %i" % \
+ (row.node, row.uuid, row.gpu_utilization, gpu_epoch))
+ lines.append("gpu_memory_utilization,node=%s,uuid=%s value=%.2f %i" % \
+ (row.node, row.uuid, row.memory_utilization, gpu_epoch))
# Join
data = "\n".join(lines)