Linux下进程数量的限制pid_max的配置方法
这是在阅读另外一个产品的告警指导书时,无意中发现 pid_max 这个参数。
原来Linux内核对于进程的数量使用 pid_max 做控制。
做一些简单的试验,如下演示获取当前配置值的方法:
# cat /proc/sys/kernel/pid_max 32768 # sysctl -a|grep pid_max kernel.pid_max = 32768
如下是 sysctl 命令的帮助。
# sysctl -h Usage: sysctl [options] [variable[=value] ...] Options: -a, --all display all variables -A alias of -a -X alias of -a --deprecated include deprecated parameters to listing -b, --binary print value without new line -e, --ignore ignore unknown variables errors -N, --names print variable names without values -n, --values print only values of a variables -p, --load[=] read values from file -f alias of -p --system read values from all system directories -r, --pattern select setting that match expression -q, --quiet do not echo variable set -w, --write enable writing a value to variable -o does nothing -x does nothing -d alias of -h -h, --help display this help and exit -V, --version output version information and exit For more details see sysctl(8).
参考资料:
linux 进程数最大值修改 https://www.jb51.net/article/143664.htm
详解linux系统下pid的取值范围 https://www.jb51.net/article/143665.htm
Linux创建进程达到65535的方法 https://www.jb51.net/article/143667.htm
总结
相关推荐
farwang 2020-11-25
星愿心愿 2020-11-24
tianhuak 2020-11-24
zhjn0 2020-11-24
昭君出塞 2020-11-23
bluecarrot 2020-11-23
linuxwcj 2020-10-21
以梦为马不负韶华 2020-10-20
彼岸随笔 2020-10-20
yutou0 2020-10-17
applecarelte 2020-10-16
ourtimes 2020-10-16
waterhorse 2020-09-19
MRFENGG 2020-11-11
rainandtear 2020-10-30
kyssfanhui 2020-10-20
liuhangtiant 2020-10-20