• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to change name and location of "core dump files"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change name and location of "core dump files"


  • Subject: Re: How to change name and location of "core dump files"
  • From: Mark Ritchie <email@hidden>
  • Date: Thu, 26 Aug 2010 09:57:03 -0700

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.
_______________________________________________

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

  • Follow-Ups:
    • Re: How to change name and location of "core dump files"
      • From: Parimal Das <email@hidden>
References: 
 >How to change name and location of "core dump files" (From: Parimal Das <email@hidden>)

  • Prev by Date: Re: sync core-data store between OS X and iOS
  • Next by Date: Re: Mixing CPP and Obj-C
  • Previous by thread: How to change name and location of "core dump files"
  • Next by thread: Re: How to change name and location of "core dump files"
  • Index(es):
    • Date
    • Thread