core文件设置
来源:互联网 发布:ios10.2.1网络验证失败 编辑:程序博客网 时间:2024/06/14 23:39
http://www.akadia.com/services/ora_enable_core.html
How do I enable core dumps for everybody
Overview
In most Linux Distributions core file creation is disabled by default for a normal user. However, it can be necessary to enable this feature for an application (e.g. Oracle). For example, if you encounter an ORA-7445 error in Oracle, then it must be possible to write a core file for the user玱racle�.
To enable writing core files you use the ulimit command, it controls the resources available to a process started by the shell, on systems that allow such control.
If you try to enable writing core files, usually you run in the following problem. Normally SSH is used to logon to the server.
ssh oracle@ora-server
$ ulimit -acore file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimitedNow, try (not as user root) to change the core file size to unlimited
$ ulimit -c unlimited
-bash: ulimit: core file size: cannot modify limit: Operation not permitted
Solution
- Check Environment for ulimit
The first step is to check, that you don't set ulimit -c 0 in any shell configuration files for this user, for example in $HOME/.bash_profile or $HOME/.bashrc. Uncomment it if you have such an entry.
#
# Do not produce core dumps
#
# ulimit -c 0
- Globally enable Core Dumps
This must be done as user root, usually in /etc/security/limits.conf
# /etc/security/limits.conf
#
# Each line describes a limit for a user in the form:
#
# <domain> <type> <item> <value>
#
* soft core unlimited
- Logoff and Logon again and set ulimit
ssh oracle@ora-server
$ ulimit -c
0
Try to set the limit as user root first
su -
ulimit -c unlimited
ulimit -c
unlimited
Now you can set ulimit also for user oracle
su - oracle
ulimit -c unlimited
ulimit -c
unlimitedPerhaps the last step number 3 is not necessary, but we have figured out, that this is the way which always work. The core file size limitation is usually also set in different configuration files. If you want to enable cores, you can uncomment them.
In /etc/profile (Redhat)
# No core files by default
# ulimit -S -c 0 > /dev/null 2>&1In /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>&1Now, from this current shell you can generate the core, so check ulimit before.
$ ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
- Linux core文件设置
- core文件设置
- linux core文件设置
- linux core文件设置
- linux core文件设置
- linux core文件设置
- 设置core文件路径
- 设置生成core文件
- linux core文件设置
- linux下core文件设置, Core Dump
- core 文件生成设置详解
- Linux生成core文件、core文件路径设置
- Linux生成core文件、core文件路径设置
- Linux生成core文件、core文件路径设置
- Linux生成core文件、core文件路径设置
- Linux生成core文件、core文件路径设置
- Linux 下如何产生core文件(core dump设置)
- linux服务器开启core开关,设置core文件路径
- cortex-A8上3G模块的支持
- ODI11g调用DBLink时报ORA-28267: Invalid NameSpace Value错误
- UTF-8转GB2312
- JavasSript中类的实现
- 配置django连接SQL Server 2005
- core文件设置
- spring中的装配集合
- 数据一致性: 时间戳策略
- 软件开发的质量红线
- 如何在JSP页面使用JSTL标签获取List的元素个数
- __declspec(dllexport),extern "c"与.def文件
- [电路设计心得] 什么是硬件设计?——成功的硬件设计需要什么?
- 若干有序链表的比对算法
- GC的运行原理