问题2:CentOS 下修改 core file size 失败解决
来源:互联网 发布:怎么用淘宝助理 编辑:程序博客网 时间:2024/05/22 16:59
目的:修改core file size
1. 查看当前的系统资源限制 ulimit -a
[root@10gr2 ~]# 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) 16061
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16061
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
【说明】:core file size (blocks, -c) 0 这项也就是关于 core file size 的限制的内容现在是0 也就不产生core file size ,现在想将这个值改为2GB
2. 在/etc/security/limits.conf 中加入下列的内容对 core file size 进行限制
* soft core 4194304
* hard core 4194304
3. 退出当前登陆,重新登陆,通过命令 ulimit -c 进行查看设置是否成功
[root@10gr2 ~]# ulimit -c
0
【说明】:设置只对当前的登陆有效,并不是对每次的登陆都生效,那么说明更改不成功
4. 查找原因,研究了一下相关的文档,有三个因素:
In /etc/profile (Redhat)
# No core files by default# ulimit -S -c 0 > /dev/null 2>&1
In /etc/init.d/functions (Redhat)
# make sure it doesn't core dump anywhere unless requested
#ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>&1这上面两个文件的ulimit 命令注释掉(不然登录后会系统执行一遍又将其改成0)
5. 修改完上面的两项之后,保存,并且退出当前登陆,重新登陆 通过命令 ulimit -c 查看
[root@10gr2 ~]# ulimit -c
4194304
修改成功!
6. 当然,还有第三种情况,就是写到当前用户的bash_profile 里了,同样如果bash_profile 里如果有 ulimit -c 0 的话,也需要去掉,否则用户重新登陆时,都会被置为0
--END--
- 问题2:CentOS 下修改 core file size 失败解决
- centos 7下启动mysql失败问题及 解决
- linux core file size 编程
- CentOS下查看修改mysql编码方式(解决乱码问题)
- 解决CentOS配置kdump失败的问题
- 解决CentOS配置kdump失败的问题
- File size limit exceeded (core dump)
- linux 上设置core file size
- Centos下mysql允许远程连接后本地登陆失败问题(已解决)
- 解决修改text里面value失败问题
- 解决centOS下xxx is not in the sudoers file 问题
- centos下 matplotlib 安装失败问题
- 解决克隆 centos虚拟机后修改克隆后的机器的ip、mac、uuid失败的问题 参考 解决办法
- centos下apache访问根目录下目录失败的解决
- “File Size Limit Exceeded”问题
- "File size limit exceeded" 问题
- CentOS 7下MySQL5.6的修改字符集编码为UTF8(解决中文乱码问题)
- CentOS 7下MySQL5.7的修改字符集编码为UTF8(解决中文乱码问题)
- JDBC笔记
- ZOJ-#3809 The Himalayas
- bestcoder Round-#8 1001 Summary
- [leetcode] 4Sum
- eclipse智能提示
- 问题2:CentOS 下修改 core file size 失败解决
- 数组函数20140908study
- AsyncTask异步任务
- 隐马尔可夫模型(HMM) HDU4865 Peter's Hobby
- 8.8-N皇后
- Hibernate简介
- BestCoder Round #8
- Node.js + Express + MongoDB教程
- 数据库范式