This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
gcore and pstack under Linux
- From: Dmitry Samersoff <dms at wplus dot net>
- To: gdb at sources dot redhat dot com
- Date: Thu, 03 Jun 2004 12:07:39 +0400
- Subject: gcore and pstack under Linux
Hi,
How about gcore and pstack under Linux ?
Yes, I know that gdb attach PID
do the same as standalone gcore,
but there is a case when it's not usable.
I have long running production service that time to
time (once a month) fails with sig11.
Sig 11 handler looks like:
void sig11_hdl(int sig)
{
if ( fork() == 0 ) // child
{ char p[32];
sprintf(p,"%ld", (long) getppid() );
execl(GCORE,"gcore", "-o", CORE,p, 0);
}
sleep(10);
abort();
}
and than watchdog send me by e-mail:
pstack CORE | c++filt
It works perfect under Solaris, but I did't find a way to do the same
under Linux.
--
Dmitry Samersoff
dms@samersoff.net, http://devnull.wplus.net
ICQ: 3161705
* There will come soft rains ...