Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • 不影响业务的情况下增加句柄限制

    Posted on

    有一些发生了硬件故障的主机,在更换配件后,系统启动后句柄限制到默认的1024,但/etc/security/limit.conf中是设置为65536的。
    更改ssh配置文件,重启ssh服务,重新登录后问题就解决了。

    请问有没有方法不重新登录即可解决句柄限制的问题?

    [BEGIN] 2016/9/8 17:08:17
    zhangyifei@periws01:/home/zhangyifei>ulimit -n
    1024
    zhangyifei@periws01:/home/zhangyifei>su - root
    密码:
    root@periws01:/root>vim /etc/ssh/sshd_config
    UseLogin yes ####原配置不变,增加一行,保存退出
    root@periws01:/root>service sshd restart
    停止 sshd: [确定]
    正在启动 sshd: [确定]
    root@periws01:/root>exit
    logout
    zhangyifei@periws01:/home/zhangyifei>exit
    logout
    zhangyifei@periws01:/home/zhangyifei>ulimit -n ############重启登录后查询
    65536

    我的openssh版本

    我的/etc/security/limit.conf配置

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat