0

マシンをリモートで変更/etc/security/limits.comして再起動しましたが、起動後もnprocパラメータは古い値のままです。

[ost@compute-0-1 ~]$ cat /etc/security/limits.conf
*   -   memlock     -1
*   -   stack       -1
*   -   nofile      4096
*   -   nproc       4096        <=====================================
[ost@compute-0-1 ~]$
Broadcast message from root@compute-0-1.local
    (/dev/pts/0) at 19:27 ...

The system is going down for reboot NOW!
Connection to compute-0-1 closed by remote host.
Connection to compute-0-1 closed.
ost@cluster:~$ ssh compute-0-1
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Last login: Tue Sep 27 19:25:25 2016 from cluster.local
Rocks Compute Node
Rocks 6.1 (Emerald Boa)
Profile built 19:00 23-Aug-2016

Kickstarted 19:08 23-Aug-2016
[ost@compute-0-1 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 516294
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 4096
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024     <=========================
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

4096に設定max user processesしましたが、再起動後も値は 1024 のままです。

4

1 に答える 1

1

という名前のファイルを見てください/etc/pam.d/sshd。見つかった場合は、ファイルを開いて次の行を挿入します。

session    required   pam_limits.so

その後、再起動後も新しい値が有効になります。

PAM は認証に関連するモジュールです。そのため、ssh ログインを介してモジュールを有効にする必要があります。

詳しくはman pam_limits.

ありがとう!

于 2016-09-27T17:01:24.293 に答える