packages: watchdog/watchdog.init - use oom_score_adj

arekm arekm at pld-linux.org
Mon Feb 7 21:10:23 CET 2011


Author: arekm                        Date: Mon Feb  7 20:10:23 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use oom_score_adj

---- Files affected:
packages/watchdog:
   watchdog.init (1.16 -> 1.17) 

---- Diffs:

================================================================
Index: packages/watchdog/watchdog.init
diff -u packages/watchdog/watchdog.init:1.16 packages/watchdog/watchdog.init:1.17
--- packages/watchdog/watchdog.init:1.16	Sun Jun 28 15:44:52 2009
+++ packages/watchdog/watchdog.init	Mon Feb  7 21:10:18 2011
@@ -18,7 +18,7 @@
 
 [ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0
 
-WATCHDOG_OOM_ADJUST="-17"
+WATCHDOG_OOM_ADJUST="-1000"
 VERBOSE="no"
 if [ -f /etc/sysconfig/watchdog ]; then
 	. /etc/sysconfig/watchdog
@@ -27,8 +27,8 @@
 adjust_oom() {
 	if [ -e /var/run/watchdog.pid ]; then
 		for pid in $(cat /var/run/watchdog.pid); do
-			if [ -w "/proc/$pid/oom_adj" ]; then
-				echo "$WATCHDOG_OOM_ADJUST" > "/proc/$pid/oom_adj" 2> /dev/null || :
+			if [ -w "/proc/$pid/oom_score_adj" ]; then
+				echo "$WATCHDOG_OOM_ADJUST" > "/proc/$pid/oom_score_adj" 2> /dev/null || :
 			fi
 		done
 	fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/watchdog/watchdog.init?r1=1.16&r2=1.17&f=u



More information about the pld-cvs-commit mailing list