How do I enable core dumps for everybody
2017-11-04 14:06
295 查看
转自: https://www.akadia.com/services/ora_enable_core.html
error in Oracle, then it must be possible to write a core file for the user
«oracle».
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 -a
core 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) unlimited
Now, 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
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
0Try 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
unlimited
Perhaps 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>&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
Now, 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
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-7445error in Oracle, then it must be possible to write a core file for the user
«oracle».
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 -a
core 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) unlimited
Now, 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 ulimitThe 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
0Try 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
unlimited
Perhaps 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>&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
Now, 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
相关文章推荐
- How do I enable core dumps for everybody
- How do I enable core dumps for everybody
- Android 如何在自定义界面上启用输入法 (How to enable inputmethod for the custom UI)
- Android 如何在自定义界面上启用输入法 (How to enable inputmethod for the custom UI)
- Linux: How to enable root user in Gnome for VirtualBox Fedora?
- How to Enable Failed Request Tracing for UNC Hosting
- enable daemon core-dumps
- "How Do I?" Videos for Devices
- How_do_I_use_the_same_pkg_file_for_debug_and_release_builds(转)
- How do I set the timeout for a JAX-WS webservice client? if you want to set timeouts for specific se
- How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x
- How to enable AI(accent insensitiv) for one column without changing session
- Linux: How to enable root user in Gnome for VirtualBox Fedora?
- How to enable USB selective suspend and system wake in the UMDF driver for a USB device
- How do I setup Git for an UE4 project?
- How do I create zip file in Servlet for download?
- How to add QuartzCore.framework for your project in xcode?
- What is tethering and how do you enable tethering?
- What is Logical Volume Management and How Do You Enable It in Ubuntu?
- How do you search for files containing dos line endings (CRLF) with grep on Linux?