Operating System - HP-UX
1834833 Members
2332 Online
110070 Solutions
New Discussion

How generates core file without stop process?

 
mzou
Occasional Contributor

How generates core file without stop process?

How generates core file without stop process in HP-UX 11.11?
6 REPLIES 6
Robert-Jan Goossens
Honored Contributor

Re: How generates core file without stop process?

Hi,

Not sure if it is possible without killing the process.

# kill -6 PID
will produce a core file, but will also kil, the process.

Other suggestion is to use truss/tusc.

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.8/

Regards,
Robert-Jan
RAC_1
Honored Contributor

Re: How generates core file without stop process?

Not possible I think. What exactly you are trying to do? If you are looking at getting the run image of the processes, you can do that.
There is no substitute to HARDWORK
Darrel Louis
Honored Contributor

Re: How generates core file without stop process?

Hi,

Don't think it's possible.
Check the following thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1005951

Read:
http://www.ma.utexas.edu/cgi-bin/man-cgi?kill+1

signum signame Name Description
0 SIGNULL Null Check access to pid
1 SIGHUP Hangup Terminate; can be trapped
2 SIGINT Interrupt Terminate; can be trapped
3 SIGQUIT Quit Terminate with core dump; can be trapped
9 SIGKILL Kill Forced termination; cannot be trapped
15 SIGTERM Terminate Terminate; can be trapped
24 SIGSTOP Stop Pause the process; cannot be trapped
25 SIGTSTP Terminal stop Pause the process; can be trapped
26 SIGCONT Continue Run a stopped process

Darrel
A. Clay Stephenson
Acclaimed Contributor

Re: How generates core file without stop process?

Do a search for a utility called "gcore"; possibly on Google with +gcore +"HP-UX" as search targets. I figure you can search as easily as I now that you know "gcore". It's also possible to launch a process under the gdb debugger and dump a core.
If it ain't broke, I can fix that.
mzou
Occasional Contributor

Re: How generates core file without stop process?

Thank you, guys.

1. HP's gdb (/opt/langtools/bin/gdb) from version 3.2 onwards has a command 'dumpcore' to achieve this.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1005951

2. gcore

3. use comand "thread apply all bt"; this method just print call stack, sometimes it's enough
mzou
Occasional Contributor

Re: How generates core file without stop process?

Thank you, guys.

1. HP's gdb (/opt/langtools/bin/gdb) from version 3.2 onwards has a command 'dumpcore' to achieve this.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1005951

2. gcore

3. use gdb comand "thread apply all bt" ; this method just print call stack, sometimes it's enough