Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to detect SIGTERM,SIGKILL signal from JAVA

807580Mar 9 2010 — edited Mar 9 2010
Dear All

We have JBOSS server running on Linux we need to track Graceful Shutdown(SIGTERM) and Forceful Shutdown(SIGKILL) timestamp , SIGNAL and write it into one log file,
We generally do
$kill PID For Graceful Shutdown(SIGTERM)
$kill -9 PID For Forceful Shutdown(SIGKILL)
PID--> the process id of java process associated with JBOSS.

We or else someone is killing the process id of java process associated with JBOSS.
i.e we get Java process ID from `ps -ef|grep java` command output and someone is killing this PID using kill command. I have to track at what timestamp java process is killed and associated SIGNAL information i.e either SIGTERM , SIGKILL or it is for system's abnormal shutdown

Is it possible to track this information using JAVA? if yes Please help me it's an urgent......... Any help is highly appreciate

Regards
Mnmonu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 6 2010
Added on Mar 9 2010
6 comments
5,435 views