Jump to content
Sign in to follow this  
NickBtheITguy

Command to determine if a process is killed

Recommended Posts

NickBtheITguy

I am putting together a script that will monitor a few processes that need to be running. If they aren't running the script starts the process. Is there a way to monitor a process though and get a message if it has been killed by the end user?

Right now as it stands, the script creates a log of when the script starts and when each process is started. So if there is more than a few minute difference between the start of the script and the start of the processes then the end user possibly tried to kill the process. If there is only a minute or so then the machine was probably rebooted. I would rather be able to monitor for the process being terminated though.

Any ideas?

Share this post


Link to post
Share on other sites
youknowwho4eva

processexists?


Giggity

Share this post


Link to post
Share on other sites
NickBtheITguy

processexists?

That's what I use now but that doesn't tell me if the end user actually terminated the process. It just checks if it exists.

Share this post


Link to post
Share on other sites
youknowwho4eva

ah so you want to see if it terminated itself or if the user did it themselves. Not sure but isn't that stored in the system log?


Giggity

Share this post


Link to post
Share on other sites
NickBtheITguy

ah so you want to see if it terminated itself or if the user did it themselves. Not sure but isn't that stored in the system log?

I'm not sure if that is stored in the system log. I might have to look into that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.