Operating System - HP-UX
1752661 Members
6202 Online
108788 Solutions
New Discussion юеВ

Re: core dump redirection, is it possible?

 
SOLVED
Go to solution

core dump redirection, is it possible?

Hello,

The pmd deamon is tend to crash on one of our systems and this lead to file system full situation on it.

Is there any means to redirect core dump other then to move starting point to other directory?
7 REPLIES 7
Bill McNAMARA_1
Honored Contributor
Solution

Re: core dump redirection, is it possible?

I always ln -s /dev/null core
in near full filesystems, so redirecting to elsewhere shouldn't be too much of a problem.
Globally I'm not sure other than crash dumps through dump on kernel tunable....

Bill
It works for me (tm)
James R. Ferguson
Acclaimed Contributor

Re: core dump redirection, is it possible?

Hi:

In the problem directory do the following:

# rm core
# touch core
# chmod 000 core

This will stop new core files from being deposited.

...JRF...
Vincenzo Restuccia
Honored Contributor

Re: core dump redirection, is it possible?

Workaround:
mv core in crontab.
Steffi Jones_1
Esteemed Contributor

Re: core dump redirection, is it possible?

Hi Alexander,

how about a different approach and resolving the root cause and see why the pmd core dumps.

There are known issue with pmd core dumping.

What is your OS level and what does "file core" say?

A first try is to install patch PHSS_23324 and PHSS_19345 if you run 10.20.

If not let us know what file on core says. maybe there is a different solution to it

Steffi Jones

Re: core dump redirection, is it possible?

Hi, All

First of all I want to say thank to you all for your help.
I made ln -s /var/tmp/core core and now I am waiting for result.

About patches I thing it is a good idea. By the way, the problem system is HP-UX 10.20 and there are installed following OV patches:
PHSS_18891, PHSS_21045, PHSS_22423
Steffi Jones_1
Esteemed Contributor

Re: core dump redirection, is it possible?

Hi Alexander,

I checked one more time in PHSS_23324 and it talks about the damon core dumping... so it would be worth a shot to install them now that we know we are talking about the 10.20 OS.

Good luck,

Steffi Jones
Bill Hassell
Honored Contributor

Re: core dump redirection, is it possible?

Thyere's a much better way to eliminate core dumps from programs besides creating directories named 'core'. The problem is that you need to create this directory in every possible directory where the program might have been started. Use the ulimit -c 0 command instead. This has been available for a long time but many people have not read the POSIX shell man page.

ulimit in the POSIX shell is a command line interface to setrlimit(2) which is a program call. Use the command ulimit -a to see all the features. You can put this into your /etc/profile so that every user inherits this setting. Or you can use a shell script to wrapper your failing program so it never creates a core dump file.

NOTE: The POSIX shell (sh) is not the Bourne shell in HP-UX 10.0 and higher, and ksh does not support any options to it's implementation of ulimit. Other non-standard shells may not support ulimit either...so /etc/profile may have to test the login shell for appropriateness.


Bill Hassell, sysadmin