Hi, I want to enable core dumping on a process so I can do post mortem debugging. This is a server process fired up by inittab which changes its owner from root down to the the correct owner. Since it doesn't run via the shell - in fact the shell never runs at all on this account, how do I turn core dumping on? (Come that how do I turn it off when I've finished as well!) Any help on this one, or pointers as to where to look would be appreciated. alan -- http://www.ibgames.net/alan Registered Linux user #6822 http://counter.li.org Winding Down - Weekly Tech Newsletter - subscribe at http://www.ibgames.net/alan/winding/mailing.html
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, On Mon, 29 Sep 2003 alan@ibgames.com wrote:
I want to enable core dumping on a process so I can do post mortem debugging. This is a server process fired up by inittab which changes its owner from root down to the the correct owner.
Since it doesn't run via the shell - in fact the shell never runs at all on this account, how do I turn core dumping on? (Come that how do I turn it off when I've finished as well!)
Any help on this one, or pointers as to where to look would be appreciated.
The default is being set in /etc/profile. I don't know if it's actually being read when init spawns a process. What you could do is to create a wrapper shell script that enables the dumping of core files: <SNIP> #!/bin/bash ulimit -c <size> <your daemon> <SNIP> Then modify /etc/inittab to call the wrapper script instead of the daemon directly. Hope that helps! Bye, LenZ - -- - ------------------------------------------------------------------ Lenz Grimmer <lenz@grimmer.com> -o) [ICQ: 160767607 | Jabber: LenZGr@jabber.org] /\\ http://www.lenzg.org/ V_V -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE/eIdxSVDhKrJykfIRAtKVAJwKI4kVdMVrBo/KsOG1rEn66KapswCeOmxq sF2BrEN+lcSynKU6Il2qYBU= =R2i5 -----END PGP SIGNATURE-----
On 29 Sep 2003 at 21:26, Lenz Grimmer wrote: Date sent: Mon, 29 Sep 2003 21:26:38 +0200 (CEST) From: Lenz Grimmer <lenz@grimmer.com> To: suse-linux-e@suse.com Subject: Re: [SLE] enabling/disabling core dumps
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
On Mon, 29 Sep 2003 alan@ibgames.com wrote:
I want to enable core dumping on a process so I can do post mortem debugging. This is a server process fired up by inittab which changes its owner from root down to the the correct owner.
Since it doesn't run via the shell - in fact the shell never runs at all on this account, how do I turn core dumping on? (Come that how do I turn it off when I've finished as well!)
Any help on this one, or pointers as to where to look would be appreciated.
The default is being set in /etc/profile. I don't know if it's actually being read when init spawns a process. What you could do is to create a wrapper shell script that enables the dumping of core files:
<SNIP> #!/bin/bash
ulimit -c <size> <your daemon> <SNIP>
Then modify /etc/inittab to call the wrapper script instead of the daemon directly. Hope that helps!
Bye, LenZ
That works as long as you don't try to exceed value set in /etc/profile (20meg in this case) Thanks for the help. alan -- http://www.ibgames.net/alan Registered Linux user #6822 http://counter.li.org Winding Down - Weekly Tech Newsletter - subscribe at http://www.ibgames.net/alan/winding/mailing.html
participants (2)
-
alan@ibgames.com
-
Lenz Grimmer