Operating System - HP-UX
1833605 Members
3777 Online
110061 Solutions
New Discussion

Core file- when SG bounced.

 
joe_91
Super Advisor

Core file- when SG bounced.

We have a situation where a core file got created from an application(java) (we have a code to limit the core to a size and to a particular dir). But the core file was generated in /. The only difference is this happened when we bounced the service guard (which calls the java script). does this happen because when we run cmrunpkg it does a su to root?

Thanks

Joe

4 REPLIES 4
Mel Burslan
Honored Contributor

Re: Core file- when SG bounced.

if root's home directory is "/" and and you are calling this scrip when you are sitting on the home directory, i.e., without issuing a cd command, it is the reason.

in your SG cntl script, where you are calling this java script, most probably in user defined start commands section, if you do something like

cd /my/limited/size/directory; /my/path/java_script

when it core dumps, it will dump it into this limited size directory.

But the bigger question is, why are you using a high availability solution and still willing to live with an application you know is going to core dump ? It is against the idea of HA in my opinion.
________________________________
UNIX because I majored in cryptology...
A. Clay Stephenson
Acclaimed Contributor

Re: Core file- when SG bounced.

The location of a core file is independent of the home directory; it is solely determined by the current working directory of the process.
If it ain't broke, I can fix that.
joe_91
Super Advisor

Re: Core file- when SG bounced.

But here the current working directory is not / and that is why i am wondering what is wrong?

Thanks

Joe
A. Clay Stephenson
Acclaimed Contributor

Re: Core file- when SG bounced.

Well, you may not think that / was the CWD but do a man 4 core and it will explain the rules. Bear in mind that the application itself might do a chdir(). It this is a daemon, it's very common practice to cd to / so that it's possible to umount an otherwise busy filesystem.
If it ain't broke, I can fix that.