Added another graph but having problems with displaying the number and processes
This commit is contained in:
parent
5c5d116056
commit
add737720e
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -19,7 +19,12 @@ class SystemMonitor:
|
||||||
"data": [],
|
"data": [],
|
||||||
"fetch_func": lambda: psutil.virtual_memory().percent,
|
"fetch_func": lambda: psutil.virtual_memory().percent,
|
||||||
"interval": 1
|
"interval": 1
|
||||||
}
|
},
|
||||||
|
"Processes": {
|
||||||
|
"data": [],
|
||||||
|
"fetch_func": lambda: self.get_process_count,
|
||||||
|
"interval": 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.graphs = {}
|
self.graphs = {}
|
||||||
self.init_graphs()
|
self.init_graphs()
|
||||||
|
@ -74,4 +79,8 @@ class SystemMonitor:
|
||||||
graph["axis"].set_xlim(0, len(data))
|
graph["axis"].set_xlim(0, len(data))
|
||||||
graph["figure"].canvas.draw()
|
graph["figure"].canvas.draw()
|
||||||
|
|
||||||
self.parent_frame.after(0, redraw)
|
self.parent_frame.after(0, redraw)
|
||||||
|
|
||||||
|
def get_process_count(self):
|
||||||
|
"""Obtiene el número de procesos actuales."""
|
||||||
|
return len(psutil.pids())
|
Loading…
Reference in New Issue