Operating System - HP-UX
1753770 Members
5045 Online
108799 Solutions
New Discussion юеВ

Re: How to enable gettign core file on HP 11

 
Amod
Occasional Advisor

How to enable gettign core file on HP 11

Hello All,

Can someone tell me what I need to do to get a core file after getting segmentation violation. I can see my process is getting
SIGSEGV, but no core file is generated.

I am using HP-UX 11 machine.

Thanks,
Amod



If you can't change it, enjoy it !!
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: How to enable gettign core file on HP 11

As far as I know core files are enabled by default.

ulimit -a

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 262144
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 0
nofiles(descriptors) 4096


Use the ulimit command to change the coredump block to a reasonable number.

ulimit -c 100

Changes the output to look like this:


[2897#] ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 262144
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 100
nofiles(descriptors) 4096


That should do it.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Elmar P. Kolkman
Honored Contributor

Re: How to enable gettign core file on HP 11

Also make sure that the process can write a core file in the current directory of the process. The directory should be writable and no core file (or a writable) exists or there is a writable core file in the directory.

Remember that the core file is not placed in the directory where the process starts, but in its current directory!
Every problem has at least one solution. Only some solutions are harder to find.
Laurent Menase
Honored Contributor

Re: How to enable gettign core file on HP 11

There is also the setuid bit which prevent to produce a core if the user is not owner of the
file.
ls -l toto
-r-sr-xr-x root bin ... toto
^ this s.