maybe done?

This commit is contained in:
Marc Mance
2024-05-30 17:03:11 -04:00
parent a25b81df22
commit d56449b2b2

View File

@@ -25,14 +25,14 @@ headerRow = [
"mem_inactive", "mem_inactive",
"mem_wired", "mem_wired",
"mem_free", "mem_free",
"arc_total", # "arc_total",
"arc_MFU", # "arc_MFU",
"arc_MRU", # "arc_MRU",
"arc_anon", # "arc_anon",
"arc_header", # "arc_header",
"arc_other", # "arc_other",
"swap_total", # "swap_total",
"swap_free", # "swap_free",
] ]
filename = "topStat.csv" filename = "topStat.csv"
@@ -126,7 +126,33 @@ def runtopstat():
for x in mem: for x in mem:
meminmeg.append(convert_to_megabytes(x)) meminmeg.append(convert_to_megabytes(x))
breakpoint() mem = meminmeg
mem_active = mem[0]
mem_inactive = mem[1]
mem_wired = mem[2]
mem_free = mem[3]
lineData = [
timestamp,
"top",
loadaverage1,
loadaverage5,
loadaverage15,
total_processes,
running,
sleeping,
zombie,
cpu_user,
cpu_nice,
cpu_system,
cpu_interrupt,
cpu_idle,
mem_active,
mem_inactive,
mem_wired,
mem_free,
]
if lineData: if lineData:
with open(filename, "a", newline="") as csvfile: with open(filename, "a", newline="") as csvfile: