最大进程在/proc//限制中意味着什么?
它是否表示该进程的最大子进程数??
如何在linux运行时限制特定进程的子进程数?
cat /proc/<pid>/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited u
有人能解释(或知道一个源)提供关于limits.conf中的项目的细节吗?手册没有给出太多的细节。
例如,它说:
rtprio
maximum realtime priority allowed for non-privileged processes (Linux 2.6.12 and higher)
priority
the priority to run user process with (negative values boost process priority)
这些有什么不同?他们能采取什么样的价值观?他们默认的是什么?
有些项目是显而易见的,但我在哪里可以找到更好的
以下脚本用于在bash中运行并行子进程,与稍有不同
#!/bin/bash
set -o monitor # means: run background processes in a separate processes...
N=1000
todo_array=($(seq 0 $((N-1))))
max_jobs=5
trap add_next_job CHLD
index=0
function add_next_job {
if [[ $index -lt ${#todo_array[@]} ]]
then
do_job $index &
ind
我在/etc/security/limits.conf s.conf中做了修改
test hard maxlogins 2
sftptest hard maxlogins 2
在上面的条目之后,我在下面的场景中进行了测试
打开两个putty会话,当我试图打开第三个会话时,它会自动断开连接(与ssh用户工作良好,而不是sftp用户)
打开2个putty会话,当我试图从filezilla/winscp连接中打开第三个会话时(与ssh用户正常工作)3.当我试图在filezilla / winscp中打开3个会话时,我可以打开3个会话(不工作)