Operating System - HP-UX
1827713 Members
2803 Online
109967 Solutions
New Discussion

Re: Get information about core

 
Marcelo De Florio_1
Frequent Advisor

Get information about core


how can i obtain information of core file ?
(about crash, etc).

MDF
Marcelo De Florio
11 REPLIES 11
John Poff
Honored Contributor

Re: Get information about core

Hi,

You can do:

strings core | more

or

what core

Here is a thread that discusses analyzing core files:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x2ec679bffde7d4118fef0090279cd0f9,00.html




JP
Sridhar Bhaskarla
Honored Contributor

Re: Get information about core

If you are talking about the core dump by the Operating System, you can use Q4 to analyze the core. You will get an idea of what might have happened to the system. Attached is the document to run Q4.

If it is about the core files dumped by the application, you can do a 'file core' file and
you will get the information about what caused it to get dumped and the process that caused the core.

You can use tools like DDE to debug the core but I will leave it to the App Admins.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Marcelo De Florio_1
Frequent Advisor

Re: Get information about core

My core file was created by application process, so how can i analze this file(core).



MDF
Marcelo De Florio
Sridhar Bhaskarla
Honored Contributor

Re: Get information about core

You can't really analyze the core. You can do a "file core" and see why it got generated. You will get the information about why it was dumped like due to what signals. You can check the message up
against /usr/include/sys/signal.h for better explanation of the signals.

To analyze the core, you can use adb command. It's very difficult to get exact reason why it core dumped. Mostly due to improper application code.

-Sri




You may be disappointed if you fail, but you are doomed if you don't try
Marcelo De Florio_1
Frequent Advisor

Re: Get information about core

Sridhar

How can i analyze core file with adb?

MDF
Marcelo De Florio
Bernie Vande Griend
Respected Contributor

Re: Get information about core

See HP document ID: KNC071499001
http://us-support2.external.hp.com/cki/bin/doc.pl/sid=4029e74705574d97ec/screen=ckiSearchResults

You won't get much out of the core unless you know how it was compiled. Your best bets are to use gdb, dde, or xdb. The document above help explains how.
Ye who thinks he has a lot to say, probably shouldn't.
linuxfan
Honored Contributor

Re: Get information about core

Hi Marcelo,

Here is a link for adb tutorial (kind of old)

http://docs.hp.com/hpux/pdf/92432-90006.pdf

-Regards
Ramesh

They think they know but don't. At least I know I don't know - Socrates
Bill Hassell
Honored Contributor

Re: Get information about core

You won't be able to do anything with the analysis unless you havde the source code to the program and development tools to debug the logic. You can see the name of the program that caused the core file as well as the reason it terminated by using the command:

file core

Now the reason might be a data alignment problem or a particular signal. That will not tell what to change in the program to get it to work properly--for that, you need a programmer and tools.


Bill Hassell, sysadmin
Sridhar Bhaskarla
Honored Contributor

Re: Get information about core

Analyzing the core has to be done with your programmer and with the source code. There are some good tools available to debugging core files. You can use dde to analyze along with the source code. adb and xdb also can help but tedious.

You will get a good hint from 'file core' however.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ray Jones_1
New Member

Re: Get information about core

I have a clean up scripts that does a file on the core, then a strings piped into head. I have 99% commercial applications so I found there is not any benifit from trying to dig deeper than the first few lines of the strings output. I get all I need to know from those two output's. Was it killed, or died, was it a memory problem, disk, io? Those are the things I need to know. And I only really take action if the same program core dumps repeatedly on the same system. I found most program core dumps are just one time events. And I estimate that I ignore about 95% of the core dump results that I get.

What I'm trying to say, is unless it is a frequent problem I wouldn't spend to much time on it. Yes look at the core and get what information you can, and log it (to determine frequency of offense).

Just my 2 cents worth.
Nothing is achieved before it is thourougly tried
Kapil_2
Advisor

Re: Get information about core

Try
gdb core
or
gdb -c core
But before that compile the program with the
-g option of cc.

Kapil