in reply to Re: Monitoring File Execution
in thread Monitoring File Execution

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.
---

Replies are listed 'Best First'.
Re: Re: Re: Monitoring File Execution
by scain (Curate) on Jun 25, 2001 at 23:51 UTC
    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