這是在閱讀另外一個(gè)產(chǎn)品的告警指導(dǎo)書(shū)時(shí),無(wú)意中發(fā)現(xiàn) pid_max 這個(gè)參數(shù)。
原來(lái)Linux內(nèi)核對(duì)于進(jìn)程的數(shù)量使用 pid_max 做控制。
做一些簡(jiǎn)單的試驗(yàn),如下演示獲取當(dāng)前配置值的方法:
# cat /proc/sys/kernel/pid_max32768# sysctl -a|grep pid_maxkernel.pid_max = 32768
如下是 sysctl 命令的幫助。
# sysctl -hUsage: 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 exitFor more details see sysctl(8).
總結(jié)
以上所述是小編給大家介紹的Linux下進(jìn)程數(shù)量的限制pid_max的配置方法,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)VEVB武林網(wǎng)網(wǎng)站的支持!
|
新聞熱點(diǎn)
疑難解答
圖片精選