Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Write error: /proc/$PID/oom_adj

Featured Replies

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 ->

 

 

  • Author

No one?

 

Am I doing something wrong or can you no longer modify emhttp so that it is better protected from OOM situations?

 

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

 

  • Author

Thanks JoeL.  Works like a charm now.  Greatly appreciate your assistance

  With the change in name from oom_adj to oom_score_adj was anything else changed, is the functioing all the same?

 

  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

Is there any reason to not use this with 5.0rc16c? Thanks!

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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.