in reply to Monitoring File Execution

What exactly do you want to monitor? If it is only kill, and you have sys admin privliges on the machine, you could write a wrapper for kill that would write to a log file when it is executed, then alias the wrapper to kill. If you want somethine else, be a little more specific.

Scott

Replies are listed 'Best First'.
Re: Re: Monitoring File Execution
by draper7 (Scribe) on Jun 25, 2001 at 23:19 UTC
    I really need just to monitor the kill command. But I'm unsure about writing a wrapper/alias. If this is too off topic, don't worry about it. I'll eventually figure out something :-).
    Thanks,
    --
    He returned to his room, closed the door, and meditated in a high mental state throughout the night.
    ---
      draper7,

      What OS are you working in? If it is Linux, I would suggest that you follow andreychek suggestion and look into process accounting, as that would be a cleaner approach than writing your own script.

      Nevertheless, the way I see a script like this working would look like this in psuedocode

      get args from command line do some checking for validity of the arguments (ie, is it a valid process number, does the user own the process, ar +e the flags/signals valid) open log file write info about user, processid, process name, whatever close log file system("kill",$args,$processid)
      More than that I can't do without spending a lot more time on it.

      Scott

Re: Re: Monitoring File Execution
by kschwab (Vicar) on Jun 26, 2001 at 05:39 UTC
    Of course, if your users are familiar with perl or C, they can bypass the wrapper. Wrapping up libc's kill() would be a little more complicated :)