If you are using some variant of UNIX/Linux, there is something called "Process Accounting". It is capable of logging every process, and does so when the process terminates.

It actually comes with RedHat 7.1 (I don't know about previous versions), and the package is called psacct.. so you can just do a
rpm -qa|grep psacct
to see if it's installed.

As far as documentation goes, you can try:
man accton man acct man sa
And to keep things on topic for this site, by all means, you could use a perl script to dig through the log file to generate usage information and statistics for you if 'sa' doesn't do what you are looking for :-)

As a side note -- process accounting is often something used on only the most secure of sites. Not all users would be fond of having their every command logged. It can border on being Big Brother. However, I'm not saying you shouldn't do it, and there are definitely times where it is useful or necessary.
-Eric

In reply to Re: Monitoring File Execution by andreychek
in thread Monitoring File Execution by draper7

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.