maybe done?
This commit is contained in:
44
topstat.py
44
topstat.py
@@ -25,14 +25,14 @@ headerRow = [
|
||||
"mem_inactive",
|
||||
"mem_wired",
|
||||
"mem_free",
|
||||
"arc_total",
|
||||
"arc_MFU",
|
||||
"arc_MRU",
|
||||
"arc_anon",
|
||||
"arc_header",
|
||||
"arc_other",
|
||||
"swap_total",
|
||||
"swap_free",
|
||||
# "arc_total",
|
||||
# "arc_MFU",
|
||||
# "arc_MRU",
|
||||
# "arc_anon",
|
||||
# "arc_header",
|
||||
# "arc_other",
|
||||
# "swap_total",
|
||||
# "swap_free",
|
||||
]
|
||||
|
||||
filename = "topStat.csv"
|
||||
@@ -126,7 +126,33 @@ def runtopstat():
|
||||
for x in mem:
|
||||
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:
|
||||
with open(filename, "a", newline="") as csvfile:
|
||||
|
||||
Reference in New Issue
Block a user