我的博客的软限制和硬限度相同

发布于 2025-02-13 13:13:27 字数 871 浏览 0 评论 0原文

在Linux中,我测试ulimit和WebLogic。我以不同的方式设置软限制和硬限制,但是Process的软限制和硬限量相同。为什么它们具有相同的价值?

# Set Soft limit
[was@was10 bin]$ ulimit –S -n 2048
# Check Soft limit
[was@was10 bin]$ ulimit -S -a
……
open files                      (-n) 2048
……
# Check Hard limit
[was@was10 bin]$ ulimit -H -a
……
open files                      (-n) 4096
……
# restart Weblogic and check limits
[was@was10 bin]$ cat /proc/$PID/limits
Limit                     Soft Limit           Hard Limit           Units
……
Max open files            4096                 4096                 files
……
# They have same value 4096
  • CentOS 7
  • /etc/security/limits.conf默认值为。
  • cat /etc/security/limits.d/*。conf
*          soft    nproc     4096
root       soft    nproc     unlimited

in Linux, I test about ulimit and WebLogic. I set soft limit and hard limit differently, but process's soft limit and hard limit is same. Why they have same value?

# Set Soft limit
[was@was10 bin]$ ulimit –S -n 2048
# Check Soft limit
[was@was10 bin]$ ulimit -S -a
……
open files                      (-n) 2048
……
# Check Hard limit
[was@was10 bin]$ ulimit -H -a
……
open files                      (-n) 4096
……
# restart Weblogic and check limits
[was@was10 bin]$ cat /proc/$PID/limits
Limit                     Soft Limit           Hard Limit           Units
……
Max open files            4096                 4096                 files
……
# They have same value 4096
  • CentOS 7
  • /etc/security/limits.conf is default.
  • cat /etc/security/limits.d/*.conf
*          soft    nproc     4096
root       soft    nproc     unlimited

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

摘星┃星的人 2025-02-20 13:13:27

我发现。

这是因为Maxfdlimit。

谢谢

I find about it.

It is because of MaxFDLimit.

Thanks

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文