aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Common/nvidia.py8
-rw-r--r--ticker.py3
2 files changed, 6 insertions, 5 deletions
diff --git a/Common/nvidia.py b/Common/nvidia.py
index e7d6188..6df684b 100644
--- a/Common/nvidia.py
+++ b/Common/nvidia.py
@@ -7,7 +7,7 @@ import numpy as np
import glob as glob
-def read_gpu_stats(node='vesta1', type='tesla'):
+def read_gpu_stats(node='vesta1', gpu_type='tesla'):
"""
Reads stats from CSV file, which was dumped on the GPU nodes.
@@ -23,7 +23,7 @@ def read_gpu_stats(node='vesta1', type='tesla'):
For example, "vesta1_1454748497.csv".
@param: node - GPU node, used to nconstruct filename [String]
- @param: type - GPU Type (Tesla|GTX) [String]
+ @param: gpu_type - GPU Type (Tesla|GTX) [String]
@return: df - GPU Stats [Pandas Dataframe]
@return: epoch - Time (Seconds since 01-01-1970) [Integer]
@return: success - Did we get data? [Boolean]
@@ -50,7 +50,7 @@ def read_gpu_stats(node='vesta1', type='tesla'):
# Branch on GPU Type. See header documentation.
# Tesla cards report all stats. GTX cards are gimped.
- if type == 'tesla':
+ if gpu_type == 'tesla':
names_cols = [ 'gpu_id', 'uuid', \
'gpu_name', \
'gpu_temperature', \
@@ -83,7 +83,7 @@ def read_gpu_stats(node='vesta1', type='tesla'):
# Add Node Column
df['node'] = pd.Series(["%s" % node]*len(df))
- elif type == 'gtx':
+ elif gpu_type == 'gtx':
names_cols = [ 'gpu_id', 'uuid', \
'gpu_name', \
'gpu_temperature' ]
diff --git a/ticker.py b/ticker.py
index 8d201bd..640b402 100644
--- a/ticker.py
+++ b/ticker.py
@@ -81,7 +81,8 @@ lines.append(line)
# This is not ideal. We should think of a way to record such failures.
# https://github.com/influxdata/influxdb/issues/4089
for gpu_node in [ 'vesta1', 'vesta2' ]:
- df, gpu_epoch, sucess = nvidia.read_gpu_stats(node=gpu_node, type='tesla')
+ df, gpu_epoch, sucess = nvidia.read_gpu_stats(node=gpu_node, \
+ gpu_type='tesla')
for irow, [ index, row ] in enumerate(df.iterrows()):
lines.append("gpu_temperature,node=%s,uuid=%s value=%.2f %i" % \
(row.node, row.uuid, row.gpu_temperature, gpu_epoch))