[Git][qa/jenkins.debian.net][master] reproducible node health: only set /proc/$pid/oom_score_adj to -1000 if not already done
Holger Levsen (@holger)
gitlab at salsa.debian.org
Mon Feb 5 11:51:26 GMT 2024
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
c99da2ef by Holger Levsen at 2024-02-05T12:51:07+01:00
reproducible node health: only set /proc/$pid/oom_score_adj to -1000 if not already done
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/reproducible_node_health_check.sh
Changes:
=====================================
bin/reproducible_node_health_check.sh
=====================================
@@ -204,7 +204,11 @@ PROCESSES="systemd squid"
for i in $PROCESSES ; do
PIDS=$(pgrep $i || true)
for pid in $PIDS ; do
- [ ! -f /proc/$pid/oom_score_adj ] || echo -1000 | sudo tee /proc/$pid/oom_score_adj
+ PROC_OOM_SCORE=/proc/$pid/oom_score_adj
+ if [ -f $PROC_OOM_SCORE ] && [ $(cat $PROC_OOM_SCORE) -ne -1000 ] ; then
+ echo -n "Setting $PROC_OOM_SCORE to "
+ echo -1000 | sudo tee $PROC_OOM_SCORE
+ fi
done
done
#
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/c99da2ef32b774754aa229eee4ad711d58f14faf
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/c99da2ef32b774754aa229eee4ad711d58f14faf
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20240205/885c81c2/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list