Operating System - Linux
1825711 Members
3236 Online
109686 Solutions
New Discussion

dumping core from a running process.

 
SOLVED
Go to solution
Srimalik
Valued Contributor

dumping core from a running process.

Hi,

Can a process dump core and keep on running?

One way I could think of is:
fork and call abort in child.

Somewhere I have also come across a library which had routines which can generate a core for the running process. (you need to link with that lib and call a routine from that lib and it will dump core but continue running)
But I am not sure whether it was/is for HP-UX.
am again trying to find that, will post the link here.

Is there any signal in HP which does this ?

Thanks
Sri
abandon all hope, ye who enter here..
10 REPLIES 10
Srimalik
Valued Contributor

Re: dumping core from a running process.

First link:

http://www.gsp.com/cgi-bin/man.cgi?section=1&topic=gcore

more coming...
abandon all hope, ye who enter here..
Fabio Ettore
Honored Contributor

Re: dumping core from a running process.

Hi,

I was looking for something on native HP-UX commands but nothing about letting the process running, I has tried some options on kill:

kill -11

does force the core generation but kill the process also.

Here instead the gcore for HP-UX (that was for 11.00) provided by Dave Olker (HP):

<>

Also Ermin suggested another interesting tool, gdb has dumpcore. Download gdb from Porting:

<>

Hope this helps you.

Best regards,
Fabio
WISH? IMPROVEMENT!
Srimalik
Valued Contributor

Re: dumping core from a running process.

Thanks,

>><>

Due to the presence of characters known to be used in Cross Site Scripting attacks, access is forbidden. This web site does not allow Urls which might include embedded HTML tags.


<>

I am some method which i may be used in a process to dump core and keep running.

abandon all hope, ye who enter here..
Pete Randall
Outstanding Contributor

Re: dumping core from a running process.

The trailing > symbol in the link is causing your problem. Try this:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=1094
47626+1205511296320+28353475&threadId=675379


Pete

Pete
Fabio Ettore
Honored Contributor

Re: dumping core from a running process.

Hi,

otherwise put in google

gcore hp-ux

and the first link you'll find is what I and Pete posted.

Best regards,
Fabio
WISH? IMPROVEMENT!
Srimalik
Valued Contributor

Re: dumping core from a running process.

the link says kill -IOT will do the job
so a call to kill(SIGIOT) should solve my problem.
Never tried using this signal, will try this on monday.
abandon all hope, ye who enter here..
Dennis Handly
Acclaimed Contributor

Re: dumping core from a running process.

>Srikrishan: the link says kill -IOT will do the job. Never tried using this signal

Don't even think of using this bogus signal, erase it from your head. This is an obsolete name for SIGABRT, which of course will not continue.

Also, I think the intention in that old thread was not to continue.

On 11.31, there is a gcore(1) command.
Srimalik
Valued Contributor

Re: dumping core from a running process.

hi Dennis,

IOT is erased :)

what does gcore do to get a core dump from a process, Is there a sys API which gcore calls with pid of the process or smthing like that?

Parallely I am also trying to find out what does gcore actually do to get a core.

Thanks
Sri

abandon all hope, ye who enter here..
Dennis Handly
Acclaimed Contributor
Solution

Re: dumping core from a running process.

>what does gcore do to get a core dump from a process

It uses ttrace(2) on 11.31:
TT_PROC_ATTACH, TT_PROC_CORE, TT_PROC_DETACH
Srimalik
Valued Contributor

Re: dumping core from a running process.

used gdb to get a core.
abandon all hope, ye who enter here..