In [1]:
%less ../datasets/vmstat_loadtest.log

In [2]:
from ozapfdis.linux import vmstat

log = vmstat.read_logfile("../datasets/vmstat_loadtest.log")
log.head()


Out[2]:
r b swpd free buff cache si so bi bo in cs us sy id wa st
UTC
2019-01-13 16:09:33 0 0 6144 2720868 41924 345548 0 0 29 691 588 541 2 4 93 1 0
2019-01-13 16:09:34 0 0 6144 2718404 42276 347908 0 0 1421 116 1789 7724 1 6 92 1 0
2019-01-13 16:09:35 0 0 6144 2718404 42276 347912 0 0 0 44 1853 7724 3 3 94 0 0
2019-01-13 16:09:36 0 0 6144 2717652 42276 347912 0 0 0 24 1778 7022 1 3 95 0 0
2019-01-13 16:09:37 0 0 6144 2717652 42276 347912 0 0 0 20 1753 7033 1 4 96 0 0

In [3]:
cpu = log.iloc[:,-5:]
cpu.head()


Out[3]:
us sy id wa st
UTC
2019-01-13 16:09:33 2 4 93 1 0
2019-01-13 16:09:34 1 6 92 1 0
2019-01-13 16:09:35 3 3 94 0 0
2019-01-13 16:09:36 1 3 95 0 0
2019-01-13 16:09:37 1 4 96 0 0

In [4]:
cpu.plot.area()


Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x24df2286630>