Operating System - HP-UX
1833059 Members
2535 Online
110049 Solutions
New Discussion

core_addpid kernel parameter

 
Jean-Michel Frippiat
Occasional Contributor

core_addpid kernel parameter

Hello,

I read at <> that
<<
11.x has a kernel param that will append the pid to the end of the core name, so instead of just 'core' you would end up with core.nnnn. This is helpful when cores would overwrite each other.

To turn it on:

echo "core_addpid /w 1" | adb -w /stand/vmunix /dev/kmem
>> (Rick Beldin)
Does that mean this is a dynamically tunable kernel parameter (no need to reboot)?
Do I turn it off with
echo "core_addpid /w 0" | adb -w /stand/vmunix /dev/kmem
?
Looks like it's an undocumented feature...
Is there such a feature in 10.20?

Thanks in advance.

Best regards,

JMF
2 REPLIES 2
harry d brown jr
Honored Contributor

Re: core_addpid kernel parameter


It would be dynamic, meaning when you reboot you lose this feature.

As for 10.20, I doubt it.

live free or die
harry
Live Free or Die
Anonymous
Not applicable

Re: core_addpid kernel parameter

if we want the change to be 'permanent' (until the next kernel build) we do
echo "core_addpid/W 1" | adb -k -w /stand/vmunix /dev/mem
echo "core_addpid?W 1" | adb -k -w /stand/vmunix /dev/mem

With
adb -k -w /stand/vmunix /dev/mem
"?" acts in /stand/vmunix as object file
"/" acts in /dev/mem
"W" writes, "X" displays the referenced symbol as hex value, "D" as decimal.
"$h" help page
"$q" quit

To make that easier to use we script this as:
root@prelude[] cat /tmp/corepid
case $1 in
on) echo "core_addpid/W 1\ncore_addpid?W 1" | adb -w -k /stand/vmunix /dev/mem;;
off) echo "core_addpid/W 0\ncore_addpid?W 0" | adb -w -k /stand/vmunix /dev/mem;;
stat) echo "core_addpid/D\ncore_addpid?D" | adb -w -k /stand/vmunix /dev/mem;;
*) echo "usage $0: on|off|stat";;
esac
root@prelude[] /tmp/corepid stat
core_addpid:
core_addpid: 0
core_addpid:
core_addpid: 0
root@prelude[] /tmp/corepid on
core_addpid: 0 = 1
core_addpid: 0 = 1
root@prelude[] /tmp/corepid stat
core_addpid:
core_addpid: 1
core_addpid:
core_addpid: 1
root@prelude[] /tmp/corepid off
core_addpid: 1 = 0
core_addpid: 1 = 0
root@prelude[] uname -a; model
HP-UX prelude B.11.11 U 9000/800 619309303 unlimited-user license
9000/800/N4000-36
root@prelude[]