gcore and pstack under Linux

Dmitry Samersoff dms@wplus.net
Thu Jun 3 08:08:00 GMT 2004


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



More information about the Gdb mailing list