centos - centos 不能用 ulimit coredump -c 是无限的
问题描述
我刚刚使用 Parallel Desktop 在我的 Mac 上安装了 CentOs 7。
这是结果ulimit -c
:
[root@centos-linux test1]# ulimit -c
无限制
这是 /etc/security/limits.conf 的内容
- 软核无限
但是没有创建核心转储文件。
我还能做些什么来启用 coredump?
解决方案
这种现象是由于错误的核心转储文件路径造成的。
我认为应该在当前目录或 /tmp 中创建 coredump 文件。但事实并非如此。
cat /proc/sys/kernel/core_pattern
告诉 coredump 文件在哪里。
在我的系统中:
[root@centos-linux Linux]# cat /proc/sys/kernel/core_pattern
/mydata/corefile/core-%e-%s-%u-%g-%p-%t
但是,/mydata/corefile
我的系统中没有。
所以我可以创建一个新目录/mydata/corefile
或使用
sysctl -w kernel.core_pattern=/tmp/core-%e-%s-%u-%g-%p-%t
在 /tmp 中获取 coredump 文件。
推荐阅读
- java - spring如何实现基于JpaRepository的自定义仓库?
- reactjs - 开玩笑错误:'jest' 不是内部或外部命令、可运行程序或批处理文件
- python - 无法使用装饰器处理具有不同分页的两个链接
- c - 尝试创建目录结构数组时出现段错误/不兼容类型错误
- docker - docker-compose: nginx 容器代理到 couchdb 容器
- swift - 选择故事板以在启动屏幕完成时启动
- c# - 如何从图片框中删除在绘画事件中绘制的矩形?C#
- ios - 根据构建环境,显示 wifi 网络不起作用
- python - 训练和测试拆分后的数据索引
- hadoop - 来自ambari的数据节点活动不稳定