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,6 +19,11 @@ class SystemMonitor:
|
|||
"data": [],
|
||||
"fetch_func": lambda: psutil.virtual_memory().percent,
|
||||
"interval": 1
|
||||
},
|
||||
"Processes": {
|
||||
"data": [],
|
||||
"fetch_func": lambda: self.get_process_count,
|
||||
"interval": 1
|
||||
}
|
||||
}
|
||||
self.graphs = {}
|
||||
|
@ -75,3 +80,7 @@ class SystemMonitor:
|
|||
graph["figure"].canvas.draw()
|
||||
|
||||
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