I have tried 'chcore -n on'
Any ideas?
Try logging out and then back in - worked for me on AIX 5.2 and AIX
6.1.
When you say it worked for you, what exactly worked for you? When I
set the core file name format using 'chcore -n on', logged off from my
ssh session, logged back in, ran kill -6 <PID>, same as before, core
was written but with standard name format, just place old 'core', no
pid or timestamp.
I appreciate your input, but perhaps you can be a little more specific
about what you did and how you verified that it was working.
Take a real simple example, just run "sleep 20 &", then in the same
session, run kill -6 <PID OF SLEEP>. Then perform an ls core* in the
directory that you ran the command from.
Thanks
# pwd
/
# mkdir corefiles
# cd corefiles
# sleep 100 &
[1] 381012
# kill -6 381012
#
[1] + IOT/Abort trap(coredump) sleep 100 &
# ls -l
total 16
-rw------- 1 root system 7188 26 Aug 17:39 core
# chcore -n on
# sleep 100 &
[1] 381024
# kill -6 381024
# ls -l
total 16
-rw------- 1 root system 7188 26 Aug 17:41 core
[1] + IOT/Abort trap(coredump) sleep 100 &
# exit
<log in again>
# cd corefiles
# ls -l
total 16
-rw------- 1 root system 7188 26 Aug 17:41 core
# sleep 100 &
[1] 381032
# kill -6 381032
#
[1] + IOT/Abort trap(coredump) sleep 100 &
# ls -l
total 32
-rw------- 1 root system 7188 26 Aug 17:41 core
-rw------- 1 root system 7188 26 Aug 17:42 core.
381032.26224212
#
Oustanding! Thank you very much for taking the time to try it all
out. The only difference that I can see, is that you ran your
commands as root. I am running as a non-root user. I will try the
sames tests and post my results.
Thank you again.
Indeed your test results are correct. I am getting the same results
when I am running the tests as root.
If I run these commands as a non-root user I still get the 'core' not
core.pid.date.
running lscore as my non-root user shows:
:~ 04:24 PM> lscore
compression: off
path specification: off
corefile location: not set
naming specification: on
I also tried setting the default to on for all users and specifically
for my non-root user:
sudo chcore -n on -d
and
sudo chcore -n on <non-root-user>
Any ideas what I might be doing wrong here. I would like this to work
for a non-root user.
Much apprecaited
aren't core dumps a potential security hole ?
# su - user
$ sleep 100 &
[1] 463006
$ kill -6 463006
$
[1] + IOT/Abort trap(coredump) sleep 100 &
$ ls -latr
total 32
-rwxr----- 1 user staff 254 27 Aug 15:47 .profile
drwxr-xr-x 7 bin bin 256 27 Aug 15:47 ..
-rw-r--r-- 1 user staff 7188 27 Aug 15:47 core.
463006.27204743
drwxr-xr-x 2 user staff 256 27 Aug 15:47 .
-rw------- 1 user staff 42 27 Aug 15:47 .sh_history
$
Any ideas how to get this working for a non-root user?
Thanks,
Isn't the sky blue?