-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch1.patch
More file actions
22 lines (21 loc) · 1.01 KB
/
Copy pathpatch1.patch
File metadata and controls
22 lines (21 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/roles/psi_monitor/files/psi-monitor.py b/roles/psi_monitor/files/psi-monitor.py
--- a/roles/psi_monitor/files/psi-monitor.py
+++ b/roles/psi_monitor/files/psi-monitor.py
@@ -132,8 +132,7 @@
LAST_IO_TOTAL, LAST_IO_TIME, io_pressure = get_instant_pressure(
PSI_IO_PATH, LAST_IO_TOTAL, LAST_IO_TIME)
- combined = max(mem_pressure, io_pressure)
- if combined > STOP_THRESHOLD:
+ if mem_pressure > STOP_THRESHOLD or io_pressure > IO_STOP_THRESHOLD:
procs = get_process_info()
pids = get_tree_pids(procs, stopped_pids)
for pid in pids:
@@ -146,7 +145,7 @@
f"mem={mem_pressure:.1f}% io={io_pressure:.1f}%\n")
except OSError:
pass
- elif combined < CONT_THRESHOLD:
+ elif mem_pressure < CONT_THRESHOLD and io_pressure < IO_CONT_THRESHOLD:
for pid in list(stopped_pids):
try:
os.kill(pid, signal.SIGCONT)