Link to home
Start Free TrialLog in
Avatar of ajen2
ajen2

asked on

Find out who kills a process

I was running on Solaris 5.8 a Java server application which is launched from an NFS mounted disc and is writing information to the NFS disc. However, should it "disappear", it will disappear (or get killed) in an hour or less. This is what I am thinking...

Is there a script/program that can keep track of a live process and tell me what happen at the end of its life or which process manipulates it last?

Note that the Java application is installed and launched by root who has access r/w/x right to both the server and the NFS mounted disc. In case this information is important.
Avatar of pjb1008
pjb1008

The file permissions are not important. A process can kill another process if the killing process is running as root or if the uids of the killing and killed processes match.

If terminals are involved, the session leader may be able to send certain signals, the default handler for which is to exit. There are a few other obscure ways to send signals, but they probably aren't the issue here.

Causes of dying that come to mind are:
a) you sent a signal by accident (eg. a SIGHUP when closing a terminal)
b) the process was sent a signal because it exceeded its CPU resource limit
c) open failed because it exceeded the number of files resource limit
d) malloc failed because it exceeded the data size resource limit
e) the java program really did exit.

Turn on process accounting so that you can see whether the process exited or died on a signal, and what its termination code was (ie. exit status or signal number).
start your application from within a shell, where you have set the coredump limit appropriate (for eyample unlimeted)
see the limit or ulimit (depending on your shell) command for details.
This gives you a coredump if your process dies abnormally.
Avatar of ajen2

ASKER

To pjb1008:
    I'd like to know how to start "process accounting" on 5.8 if you can spare the time. Thanks.

To ahoffmann:
    The application is launched from within a shell. So far there is no coredump at all. But thanks for the suggestion on checking the limit/ulimit.
ASKER CERTIFIED SOLUTION
Avatar of pjb1008
pjb1008

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by pjb1008

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange