We have JBOSS server running on Linux we need to track Graceful Shutdown(SIGTERM) and Forceful Shutdown(SIGKILL) timestamp and write it into one file, I am new to UNIX Signal processing if is it possible how to detect it?
We generally do
$kill PID For Graceful Shutdown(SIGTERM)
$kill -9 PID For Forceful Shutdown(SIGKILL)
Thanks in advance.Is is possible using Shell Script or C or JAVA if yes please suggest me.
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 ? if yes Please help me it's an urgent.........
stty echo # turn echo off prior to capturing a password
trap 'stty echo;exit' INT # if the user does a ctrl+c to exit the password prompt the trap will turn the echo back ON.
Do not trap signal 9.
BTW it is rarely ever necessary or advisible to issue "kill -9" unless you are in severe difficulties when shutting a system down.
Suggest you approach the software authors about the correct way to shut down the application.
We or else someone is killing the process id of java process associated to 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 i.e either SIGTERM or SIGKILL