Linux下進(jìn)程數(shù)量的限制pid_max的配置方法
這是在閱讀另外一個(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_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 進(jìn)程數(shù)最大值修改 https://www.jb51.net/article/143664.htm
詳解linux系統(tǒng)下pid的取值范圍 https://www.jb51.net/article/143665.htm
Linux創(chuàng)建進(jìn)程達(dá)到65535的方法 https://www.jb51.net/article/143667.htm
總結(jié)
以上所述是小編給大家介紹的Linux下進(jìn)程數(shù)量的限制pid_max的配置方法,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)本站網(wǎng)站的支持!
版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。
關(guān)注官方微信