Re: How to change name and location of "core dump files"
Re: How to change name and location of "core dump files"
- Subject: Re: How to change name and location of "core dump files"
- From: Parimal Das <email@hidden>
- Date: Fri, 27 Aug 2010 18:51:02 +0530
Thanks a lot Mark.
I will try this and post the code :)
-Parimal Das
On Thu, Aug 26, 2010 at 10:27 PM, Mark Ritchie <email@hidden> wrote:
> Hey!
>
> On 26/Aug/2010, at 7:29 AM, Parimal Das wrote:
> > How i can change this core name to a more readable one, say
> core.myApp.xxxx
> > Also can i change the default location of core generation??
>
>
> Be careful as this is controlled system wide, not per process. ;-)
>
> And to be clear, I've not messed with this in a long long time so please
> try on a TEST system first!
>
> sysctl is what you're looking for:
> $ sysctl -a kern.corefile
> kern.corefile: /cores/core.%P
>
>
> From bsd/kern/kern_proc.c in xnu-1504.7.4 (OSX 10.6.4)
> /*
> * proc_core_name(name, uid, pid)
> * Expand the name described in corefilename, using name, uid, and pid.
> * corefilename is a printf-like string, with three format specifiers:
> * %N name of process ("name")
> * %P process id (pid)
> * %U user id (uid)
> * For example, "%N.core" is the default; they can be disabled completely
> * by using "/dev/null", or all core files can be stored in
> "/cores/%U/%N-%P".
> * This is controlled by the sysctl variable kern.corefile (see above).
> */
>
> Enjoy!
> M.
>
--
--
Warm Regards,
Parimal Das
Webyog Softworks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden