In [1]:
import numpy as np
import datetime
from matplotlib import gridspec
from matplotlib.ticker import NullFormatter, NullLocator, MultipleLocator
import matplotlib.pylab as plt
import pandas as pd
import seaborn as sns
sns.set_palette('husl')
sns.set(style='ticks')

In [2]:
%matplotlib inline
plt.rcParams['figure.figsize'] = [17, 10]

In [3]:
df = pd.read_csv(
    'record.log',
    names = [
        'datetime',
        'GPU_name',
        'GPU_temperature_C',
        'GPU_power_draw_W',
        'GPU_memory_used_MiB',
        'GPU_memory_total_MiB',
        'GPU_utilization_%'
    ]
)
df['datetime']             = pd.to_datetime(df['datetime'])
df.index                   = df['datetime']
df['GPU_power_draw_W']     = df['GPU_power_draw_W'].str.replace(' W', '').astype(float)
df['GPU_memory_used_MiB']  = df['GPU_memory_used_MiB'].str.replace(' MiB', '').astype(float)
df['GPU_memory_total_MiB'] = df['GPU_memory_total_MiB'].str.replace(' MiB', '').astype(float)
df['GPU_utilization_%']    = df['GPU_utilization_%'].str.replace(' %', '').astype(float)
df.head()


Out[3]:
datetime GPU_name GPU_temperature_C GPU_power_draw_W GPU_memory_used_MiB GPU_memory_total_MiB GPU_utilization_%
datetime
2019-06-21 15:32:48 2019-06-21 15:32:48 GeForce GTX 1070 35 5.07 103.0 8119.0 0.0
2019-06-21 15:32:49 2019-06-21 15:32:49 GeForce GTX 1070 35 5.23 103.0 8119.0 0.0
2019-06-21 15:32:50 2019-06-21 15:32:50 GeForce GTX 1070 35 5.39 103.0 8119.0 0.0
2019-06-21 15:32:51 2019-06-21 15:32:51 GeForce GTX 1070 35 5.22 103.0 8119.0 0.0
2019-06-21 15:32:52 2019-06-21 15:32:52 GeForce GTX 1070 34 5.07 103.0 8119.0 0.0

In [4]:
df.plot(y=['GPU_temperature_C']);


/usr/local/lib/python3.5/dist-packages/pandas/plotting/_core.py:1716: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access
  series.name = label

In [ ]: