1847082 Members
4930 Online
110262 Solutions
New Discussion

coreadm on HP-UX 11i

 
tash S
Frequent Advisor

coreadm on HP-UX 11i

Hello All,

Solaris has the utiliy, "coreadm" for analizing core in-detailed, like which process generate the core.

The below is the explanation of Solaris man command.
----------------------------------------
The coreadm command is used to specify the name and location of core files produced by abnormally-terminating processes.
----------------------------------------

But it seems to me that HP-UX does not have such a utility. If someone knows the utility, please let me know.

Regards;
-tash S
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: coreadm on HP-UX 11i

To know which process generated the core file, all you need is "file core". To do further analysis requires a debugger to do a stack trace --- but that also requires some knowlegde of coding, of the application, and preferably the source code. You may also be advised to do a "strings core" but that is of essentially no benefit because all it will do is display string constants (such as a set of possible error messages) but will in no way indicate which of those error messages If any) was actually displayed.
If it ain't broke, I can fix that.
tash S
Frequent Advisor

Re: coreadm on HP-UX 11i

"a debugger to do a stack trace " can not show which the number of process generates core. For example, the process number 1932 generate the core, etc. I would like to know which the number of process generates core.

Regards;
-tash S
A. Clay Stephenson
Acclaimed Contributor

Re: coreadm on HP-UX 11i

But "file core" will tell you which executable is at fault. Generally the pid doesn't matter as that is used to identify the executable (which is no longer running). You can modify the kernel to append the PID so that rather than "core", you see "core.23098" but even then since 23098 is no longer running, it's of little value. You use the debugger AFTER "file core" tells you which executable to analyze.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: coreadm on HP-UX 11i

If you want to modify your system to append the PID to the core filename then :

Under HP-UX 11.0 and 11.11:

echo "core_addpid/W 1" | adb -k -w /stand/vmunix /dev/kmem

and under 11.23:

echo "core_addpid/W 1" | adb -o -w /stand/vmunix /dev/kmem

but again, because the process is no longer running, knowing the PID is of little value unless you have been running a series of ps -e's (or similar) prior to the program crash.
If it ain't broke, I can fix that.
tash S
Frequent Advisor

Re: coreadm on HP-UX 11i

My core indicates the following info.
Also we also can not see PID when generate the core.


==========================================
bash-2.04# echo "core_addpid/W 1" | adb -k -w /stand/vmunix /dev/kmem
core_addpid: 1 = 1
==========================================
A. Clay Stephenson
Acclaimed Contributor

Re: coreadm on HP-UX 11i

After the adb command has been run, any core files generated after the core_addpid has been set to 1 will append the PID to the filename so that instead of seeing "core", you will see "core.34123" where 34123 is the PID of the aborted process.
If it ain't broke, I can fix that.