cancel
Showing results for 
Search instead for 
Did you mean: 

core file

SOLVED
Go to solution
Chakravarthi
Trusted Contributor

core file

Hi,

core file is not getting generated in redhat 8 machine,

ulimit -a o/p is given below

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 4027
virtual memory (kbytes, -v) unlimited

11 REPLIES
Vishwas Pai
Regular Advisor

Re: core file

Answer is in your question.

$ ulimit -c unlimited


Cheers -vishwas
Chris Xu
Trusted Contributor
Solution

Re: core file

The system-wide setting of the core dump limit can be found in /etc/profile as below:

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

But if this is only applied to a specific user account, I would recommend only to make necessary changes in the user's profile. In addition, you would like to set some limit to core file. Making it unlimited would risk filling up your filesystem if the core file is huge or larger than the available space in the filesystem.

Chris
Chakravarthi
Trusted Contributor

Re: core file

i tried ulimit -c unlimited and also commented the entry in /etc/profile, still it doesnt create the core file
Vishwas Pai
Regular Advisor

Re: core file

What is the output of ..

# sysctl -A | grep -i kernel.core

-vishwas
Dusan Krasa
Advisor

Re: core file

Hi,
on the RH/Fedora distro look at /etc/security/limits.conf .

Finally edit the /etc/profile file and change the following line: ulimit -c

to read: ulimit -S -c > /dev/null 2<&1
Chris Xu
Trusted Contributor

Re: core file

How did you try to create a core file? By a command or running a script?

Chris
Chakravarthi
Trusted Contributor

Re: core file

[root@ripple root]# sysctl -A | grep -i kernel.core
kernel.core_uses_pid = 1

i tried creating core file by killing process by sending SIGSEGV signale

kill -11
Vitaly Karasik_1
Honored Contributor

Re: core file

Dusan is right, you should add to

/etc/security/limits.conf

two lines

* soft core unlimited
* hard core unlimited

and edit /etc/profiles
Chakravarthi
Trusted Contributor

Re: core file

do i need to restart the machine after the changes???
Vitaly Karasik_1
Honored Contributor

Re: core file

as far as I understand, re-login and restart your process is enough
Chakravarthi
Trusted Contributor

Re: core file

hi all,

i tried all the suggestions still the process is not generating the core file,

any suggestions!!