LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How I know when my app is shutdown (https://www.linuxquestions.org/questions/linux-newbie-8/how-i-know-when-my-app-is-shutdown-754139/)

johnhelen 09-10-2009 07:02 AM

How I know when my app is shutdown
 
Hello

I have an application(process) that was shutdown some days ago but I do not know why (the computer is still running). I want to know when the app was shutdown so I can find out the reason. However, the application's log only show when is started.

Here is the output of ps -ef command after I restarted the application

admin 18064 1 0 11:11 pts/2 00:00:03 java -server -Djava.ext.dirs=. -Djava.rmi.server.hostname=localserver org.alfresco.deployment.Main application-context.xml

Is there any information in a system log that helps me to know when the app was shutdown?. Could you please help

Many thanks
johnhelen

TB0ne 09-10-2009 08:42 AM

Quote:

Originally Posted by johnhelen (Post 3677150)
Hello

I have an application(process) that was shutdown some days ago but I do not know why (the computer is still running). I want to know when the app was shutdown so I can find out the reason. However, the application's log only show when is started.

Here is the output of ps -ef command after I restarted the application

admin 18064 1 0 11:11 pts/2 00:00:03 java -server -Djava.ext.dirs=. -Djava.rmi.server.hostname=localserver org.alfresco.deployment.Main application-context.xml

Is there any information in a system log that helps me to know when the app was shutdown?. Could you please help

Many thanks
johnhelen

Not enough information to say. If the app was killed (like with a "kill -9"), then the only way to know would be if the application itself wrote something before dying, or to look at everyone's .bash_history, to see who issued the kill statement.

If the application has a shutdown script, that may tell something, but since you don't say anything about what the application is, any details about it, or version/distro of Linux, we can't really be of much help.

Marko Hyvärinen 09-11-2009 06:31 AM

if process dies, not to my knowlegdy there are no place it is written up.

put your own script for example to detect shutdown if happens more frequently.

Marko

does that java program have application log own ?
or try:
grep -iE "your program name" /var/log/messages
for example....

Marko


All times are GMT -5. The time now is 01:26 AM.