Read core files


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
# 1  
Question Read core files

In sun solaris whenever a jvm crashes we used to get the core file generated in binary format. We convert this core file to human readable format using

Code:
pstack corefile >> log

How can we convert the core file generated in HPUX to human readable format ? We dont have pstack either.
# 2  
Do you have adb on HP-UX? If so, you could try
Code:
adb programfile corefile
    $c
    $q

That should give you a stack backtrace (syntax from memory and from Solaris, hope I got it right and the syntax is the same).
This User Gave Thanks to hergp For This Post:
# 3  
Error

Quote:
Originally Posted by hergp
Do you have adb on HP-UX? If so, you could try
Code:
adb programfile corefile
    $c
    $q

That should give you a stack backtrace (syntax from memory and from Solaris, hope I got it right and the syntax is the same).

Yes i have adb. But i fail to understand yr command. I know corefile that got generated. But what is programfile and what is $c and $q ? Can you please give me a more details step by step as I an alien to adb tool you pointed.
# 4  
programfileis the filename or pathname of the program which generated the core file.

When you start adb, you find yourself in an interactive mode without any prompt Smilie

The first command, $c, prints the stack backtrace. The second command, $q, terminates adb and you'll find yourself at the shell prompt.

That is, if adb on HP-UX works the same, as on Solaris.
# 5  
Question

Quote:
Originally Posted by hergp
programfileis the filename or pathname of the program which generated the core file.

When you start adb, you find yourself in an interactive mode without any prompt Smilie

The first command, $c, prints the stack backtrace. The second command, $q, terminates adb and you'll find yourself at the shell prompt.

That is, if adb on HP-UX works the same, as on Solaris.
So there cannot be a output file generated as shown in the OP ?

How can i find out the
Code:
programfile

? All i know is the PID of the JVM.
# 6  
You can produce an outputfile with:

Code:
adb programfile corefile <<EOF >>log
    $c
    $q
EOF

The file command tells you the program name, but not the path. You might get a clue when you look at the output from ps -ef | grep java when your Java program is running fine. Take into account, that java is a symbolic link in most installations.
# 7  
Question

Quote:
Originally Posted by hergp
You can produce an outputfile with:

Code:
adb programfile corefile <<EOF >>log
    $c
    $q
EOF

The file command tells you the program name, but not the path. You might get a clue when you look at the output from ps -ef | grep java when your Java program is running fine. Take into account, that java is a symbolic link in most installations.

Can you tell me the
Code:
programfile

from the below output ?

Quote:
bea 8422 8406 0 22:50:49 ? 72:31 /opt/app/d1grn1m1/app1/jdk150_07/bin/IA64N/java -server -Xms1024m -Xmx1536m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:NewSize=512m -XX:MaxNewSize=512m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+DisableExplicitGC -verbose:gc -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -da -Dplatform.home=/opt/app/app1/bea/weblogic92 -Dwls.home=/opt/app/app1/bea/weblogic92/server -Dwli.home=/opt/app/app1/bea/weblogic92/integration -Dweblogic.management.discover=false -Dweblogic.management.server=servera:7001 -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/appl/bea/patch_weblogic922/profiles/default/sysext_manifest_classpath -Dxng.log.server=myserver -javaagent:/appl/introscope/wily/Agent.jar -Dcom.wily.introscope.agentProfile=/appl/introscope/Agentfiles/IntroscopeAgent.profile -Dintroscope.agent.agentName=myserver -Dwebl
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #538
Difficulty: Medium
A programming language that requires you to declare a variable and its type is a non-statically typed language.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Should i delete core files ?

Good morning, i need your help please By searching some of the largest files i found some core files that take up much space This is the command: find ./ -type f -name core -exec file {} \; Output: ./xptol/tel/tasacion/CIERR/exe/core: ELF 64-bit MSB core file SPARCV9 Version 1, from... (2 Replies)
Discussion started by: alexcol
2 Replies

2. Linux

unable to read core dumps on unix. Is there another way than using GDB?

hi all, I am having set of core dumps obtained from client server. Now i am trying to read them but unable to do so. I have few queries: 1. Core dumps were generated on some xyz server and copied to my unix virtual. Can I read them as text here? 2. I tried installing gdb-7.3 but when i fire... (0 Replies)
Discussion started by: suyogs
0 Replies

3. UNIX for Dummies Questions & Answers

How to know where the core files come from?

Hi, I am trying to use "find / -name core -print | xargs rm -f " ,but it would delete all core files including some core files we do not want to delete. I search privious posts,someone said "To check what a core file came from - use the file command" I used man page to search file command,but... (9 Replies)
Discussion started by: lemon_06
9 Replies

4. UNIX for Advanced & Expert Users

read() wont allow me to read files larger than 2 gig (on a 64bit)

Hi the following c-code utilizing the 'read()' man 2 read method cant read in files larger that 2gig. Hi I've found a strange problem on ubuntu64bit, that limits the data you are allowed to allocate on a 64bit platform using the c function 'read()' The following program wont allow to allocate... (14 Replies)
Discussion started by: monkeyking
14 Replies

5. UNIX for Dummies Questions & Answers

Cleaning core files

Hello *! Just a short question. Where on the system i can find core files. I have one SUN server (Solaris 8) and from time to time I must clean core files on it. But i am not sure where i can find those files. Thank you in advance. :) (5 Replies)
Discussion started by: ghost01
5 Replies

6. UNIX for Dummies Questions & Answers

hp ux core files

what are core files?? Can I safely delete them??? Please, help (2 Replies)
Discussion started by: ldaliosmane
2 Replies

7. Solaris

How to read a core file

I have a SUN Ultra 80 running Solaris 5.8 I have a couple of applications running on it. The /var/core file seems to be filling up by 2% per day. Could anyone pls suggest how to read contents of /var/core I have read couple of docs but seems to be too cumbersome. Please suggest something example... (3 Replies)
Discussion started by: Tirmazi
3 Replies

8. UNIX for Dummies Questions & Answers

system log files and core files?

Solaris v5.6 What log files should be checked out as part of your sys admin daily routine? I've printed out my syslog.conf file, and looked in /var/log and found authlog, syslog, and POPlog. I know of /var/adm/messages. What others should I be looking for? I know of the "find" command. I... (8 Replies)
Discussion started by: Westy564
8 Replies

9. UNIX for Advanced & Expert Users

What can be done with core files???

please help me, what can i do with the bountiful amount of core files our systems seem to have on occassional basis?? how do I analyze it and determine why the core file was dumped by the application that dumped it. the operating systems we use are solaris, DG-UX and linux red hat systems. (5 Replies)
Discussion started by: TRUEST
5 Replies

10. UNIX for Dummies Questions & Answers

core files

ok heres a question, :confused: well obviously i have here my old old motorola system V/88 in my /usr/adm folder i have a file called kernelcore which is 16mb (the computer has 16mb ram too), we believe this is the contents of our ram when the system crashed back in feb last year! Is it save... (2 Replies)
Discussion started by: Vodor
2 Replies

Featured Tech Videos