aboutsummaryrefslogtreecommitdiffstats
path: root/community/low-memory-monitor/low-memory-monitor.initd
blob: 68a914bb4884a724d2a17c20028e6f4dc61ba68f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/sbin/openrc-run
supervisor=supervise-daemon

name="Low Memory Monitor"
description="Read memory pressure information and signal user processes and kernel OOM accordingly"

command=/usr/libexec/low-memory-monitor

depend() {
	need localmount
}

start_pre() {
	# We need /proc/pressure directory that contains information about memory
	# pressure. this requires CONFIG_PSI=y, if CONFIG_PSI_DEFAULT_DISABLED is
	# also used then you need to pass psi=1 on the kernel cmdline
	test -d /proc/pressure
}