How to protect Services

Use case unbound.service

systemctl edit unbound.service
[Unit]
Before=remote-fs-pre.target
[Service]
OOMScoreAdjust=-1000
ExecStartPre=
ExecStartPre=/usr/sbin/unbound-checkconf

systemctl daemon-reload

systemctl restart unbound.service

How to protect Process

Use case icewm/tl-session

  • #/etc/cron.d/oom_disable

  • */1 * * * * root pgrep -f "icewm" | while read PID; do echo -17 > /proc/$PID/oom_adj; done
  • */1 * * * * root pgrep -f "tl-session" | while read PID; do echo -17 > /proc/$PID/oom_adj; done
Topic revision: r3 - 23 Mar 2023, Dibiase
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki_Virgo_LSC? Send feedback