I need to find out the history of a script execution in my Linux box. I need to know, how many times it was restarted, by who and when. This is not a system process. This is a ksh script.
Is there any way to do this? Thanks for any help.
—– Update
Ok, I get it that I cant retrospectively get all the data that I had initially asked for. However, could I even get how many times this ksh was run and when? I know the user that runs it.
Thanks for any help.
Best Answer
Without real auditing activated, in the general case the answer will be that this is not possible.
If the users you are concerned about cannot change the script, you easily can add a very simple logging function with the help of the
logger
command.Add a line like the following to your script: