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
pstack corefile >> log
How can we convert the core file generated in HPUX to human readable format ? We dont have pstack either.
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.
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.
Now, inorder to convert the whole core file into human readable format you asked me to <<EOF>>.. I'm sorry I dont get what you mean by this. Can you explain in simpler way(Are you asking me to give a logfile name ?? ).
Also as you can see the output above which I am not sure is the desired output because the core dump file is in GBs while the output above is just a few lines. the
file
command shows the format of the core file remained the same. So how did it help ? Am I missing something ?
The EOF-thing is a so called "here-document". This way you can write the input to a command into a shell script. It means
adb programfile corefile <<EOF >>log
Start adb programfile corefile , read the input for the adb-command from the shellscript, until a line is encountered which reads EOF and append the output to the file log
$c
$q
This is the input to the adb-command. The two lines mean: write out the stacktrace and quit
EOF
This ends the here-document. The adb-command will read end-of-file at this point.
I don't know, what you mean with "human readable form". The adb-output is pretty much the same, as the output from pstack.
So, the log file generated using your guidelines is 52 bytes from the core file 1.9 GB ? I feel the log file generated in human readable form should be much more than 52 bytes. Can you make me understand this ??