July 10, 201312 yr unRaid version: 5.0-beta11 VM Trying to do the following. Not getting OOM but would like to have it in place just in case: pgrep -f "/usr/local/sbin/emhttp" | while read PID; do echo -1000 > /proc/$PID/oom_adj; done Gives me: root@Tower:/root -> pgrep -f "/usr/local/sbin/emhttp" | while read PID; do echo -1000 > /proc/$PID/oom_adj; done -bash: echo: write error: Invalid argument So stepping thru it: root@Tower:/root -> pgrep -f "/usr/local/sbin/emhttp" | while read PID; do echo $PID; done 1378 root@Tower:/root -> ls -l /proc/ | grep 1378 dr-xr-xr-x 6 root root 0 2013-07-10 09:16 1378/ dr-xr-xr-x 6 root root 0 2013-07-10 11:02 13785/ dr-xr-xr-x 6 root root 0 2013-07-10 11:00 13786/ root@Tower:/root -> ls -l /proc/1378 total 0 -r-------- 1 root root 0 2013-07-10 11:08 auxv --w------- 1 root root 0 2013-07-10 11:08 clear_refs -r--r--r-- 1 root root 0 2013-07-10 11:08 cmdline -rw-r--r-- 1 root root 0 2013-07-10 11:08 comm -rw-r--r-- 1 root root 0 2013-07-10 11:08 coredump_filter lrwxrwxrwx 1 root root 0 2013-07-10 11:08 cwd -> // -r-------- 1 root root 0 2013-07-10 11:08 environ lrwxrwxrwx 1 root root 0 2013-07-10 11:08 exe -> /usr/local/sbin/emhttp* dr-x------ 2 root root 0 2013-07-10 11:08 fd/ dr-x------ 2 root root 0 2013-07-10 11:08 fdinfo/ -r--r--r-- 1 root root 0 2013-07-10 11:08 limits -r--r--r-- 1 root root 0 2013-07-10 11:08 maps -rw------- 1 root root 0 2013-07-10 11:08 mem -r--r--r-- 1 root root 0 2013-07-10 11:08 mountinfo -r--r--r-- 1 root root 0 2013-07-10 11:08 mounts -r-------- 1 root root 0 2013-07-10 11:08 mountstats dr-xr-xr-x 4 root root 0 2013-07-10 11:08 net/ -rw-r--r-- 1 root root 0 2013-07-10 11:08 oom_adj -r--r--r-- 1 root root 0 2013-07-10 11:08 oom_score -rw-r--r-- 1 root root 0 2013-07-10 11:08 oom_score_adj -r-------- 1 root root 0 2013-07-10 11:08 pagemap -r-------- 1 root root 0 2013-07-10 11:08 personality lrwxrwxrwx 1 root root 0 2013-07-10 11:08 root -> // -r--r--r-- 1 root root 0 2013-07-10 11:08 smaps -r--r--r-- 1 root root 0 2013-07-10 11:08 stat -r--r--r-- 1 root root 0 2013-07-10 11:08 statm -r--r--r-- 1 root root 0 2013-07-10 11:08 status -r-------- 1 root root 0 2013-07-10 11:08 syscall dr-xr-xr-x 4 root root 0 2013-07-10 11:02 task/ -r--r--r-- 1 root root 0 2013-07-10 11:08 wchan root@Tower:/root -> cat /proc/1378/oom_adj 0 root@Tower:/root -> echo -1000 -1000 root@Tower:/root -> echo -1000 > /proc/1378/oom_adj -bash: echo: write error: Invalid argument root@Tower:/root ->
July 11, 201312 yr Author No one? Am I doing something wrong or can you no longer modify emhttp so that it is better protected from OOM situations?
July 12, 201312 yr No one? Am I doing something wrong or can you no longer modify emhttp so that it is better protected from OOM situations? You ARE doing something wrong. The /proc parameter changed from when in the 4.7 series. It is no longer named oom_adj in the newer kernels. It is named oom_score_adj pgrep -f "/usr/local/sbin/emhttp" | while read PID; do echo -1000 > /proc/$PID/oom_score_adj; done
July 12, 201312 yr With the change in name from oom_adj to oom_score_adj was anything else changed, is the functioing all the same?
July 13, 201312 yr With the change in name from oom_adj to oom_score_adj was anything else changed, is the functioing all the same? Yes. The value set permitted changed from +-17 to +-1000
July 13, 201312 yr Is there any reason to not use this with 5.0rc16c? Thanks! I can't think of any... especially if you are going to be running any add-ons that might malfunction and accidentally use up all available memory.
Archived
This topic is now archived and is closed to further replies.