当搜索OOM得分时,所有的顶级链接似乎都表明值必须在-1000到1000之间。
我试着用一个简单的cat /proc/*/oom_score | sort -n | less来验证这一点,我和我遇到的各种值从0到30132501不等,其中绝大多数在1000到10000之间。
我该怎么解释呢?
据我所知,没有什么是手动调整oom_score文件的。
系统信息:
%uname -a
Linux hhgw16 2.6.18-371.el5 #1 SMP Tue Oct 1 08:35:08 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
% lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.10 (Final)
Release: 5.10
Codename: Final发布于 2021-08-24 14:28:14
这可能只是那个老内核中的一个历史怪癖。我刚刚尝试了我的内核(类似于香草版本5.4.124),得到了如下结果:
$ cat /proc/*/oom_score | sort -n | uniq -c
274 0
9 1
2 2
1 3
2 4
1 5
1 10
2 17
1 20
1 37
1 42
3 200
1 201
1 202
1 205
1 212
4 300
11 301
16 302
24 303
3 304
3 305
1 306
1 310
1 313(第一列是具有此值的进程的计数,第二列是oom_score值,您可以看到我的系统不会超过1000)。
https://unix.stackexchange.com/questions/274618
复制相似问题