Operating System - HP-UX
1824846 Members
3851 Online
109674 Solutions
New Discussion юеВ

Re: Change the CORE file location ?

 
SOLVED
Go to solution
Thomaz Portella_3
Super Advisor

Change the CORE file location ?

I prefer change the location of core file, /export/home, example.
I dont want to use ulimit to limit the core file size, but I want to send it to other location than root .
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Change the CORE file location ?

You could try this:

ln -s /tmp/core /exporthome

This might redirect core files to another location.

As far as I know core files show up where they happen.

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
Jeff Schussele
Honored Contributor

Re: Change the CORE file location ?

Hi Thomaz,

The location where core files are deposited is dependent on the $PWD value - typically wherever you are are when you start the process.
So you have two options:
1) cd /where/you/want/to/be #when you start the process
or
2) export PWD=/where/you/want/the/corefile #before you start the process.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Thomaz Portella_3
Super Advisor

Re: Change the CORE file location ?

The HTTPD application created the CORE file not OVW.
I am usind an application to show OVW environment to operators. They dont use OVW himself.
Anyone knows how to solve that ?
Jeff Schussele
Honored Contributor
Solution

Re: Change the CORE file location ?

Hi Thomaz,

Well, the httpd process probably uses some sort of script to startup. If so then edit it & add the export PWD=/path/to/corefile up top.
If it's just a binary, then create a script that sets $PWD & runs the binary.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sundar_7
Honored Contributor

Re: Change the CORE file location ?

Setting the PWD to a different directory effectively "cd"es you to the directory.

This might work for HTTPD but I know of applications that tend to refer files using the relative path and fail to startup.

As such there is no way to get the process core dump to a different directory other than the current directory.
Learn What to do ,How to do and more importantly When to do ?