Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you install the BSD Process Accounting utilities (package <code>acct</code> on Debian and Ubuntu) you can use the <code>sa(8)</code> utility to summarize executions or give you semi-detailed execution logs:</p> <pre><code>$ lastcomm ... man F X sarnold pts/3 0.00 secs Fri May 4 16:21 man F X sarnold pts/3 0.00 secs Fri May 4 16:21 vim sarnold pts/3 0.05 secs Fri May 4 16:20 sa sarnold pts/3 0.00 secs Fri May 4 16:20 sa sarnold pts/3 0.00 secs Fri May 4 16:20 bzr sarnold pts/3 0.99 secs Fri May 4 16:19 apt-get S root pts/1 0.44 secs Fri May 4 16:18 dpkg root pts/1 0.00 secs Fri May 4 16:19 dpkg root pts/1 0.00 secs Fri May 4 16:19 dpkg root pts/1 0.00 secs Fri May 4 16:19 apt-get F root pts/1 0.00 secs Fri May 4 16:19 ... </code></pre> <pre><code>$ sa 633 15.22re 0.09cp 0avio 6576k 24 8.51re 0.03cp 0avio 6531k ***other* 2 0.31re 0.02cp 0avio 10347k apt-get 3 0.02re 0.02cp 0avio 9667k python2.7 18 0.04re 0.01cp 0avio 5444k dpkg 2 0.01re 0.01cp 0avio 13659k debsums ... </code></pre> <p>The format of the <code>acct</code> file is documented in <code>acct(5)</code>, so you could write your own programs to parse the files if none of the standard tools lets you express the queries you want.</p> <p>Probably the largest downside to the BSD process accounting utilities is that the kernel will only update the process accounting log when processes exit, because many of the summary numbers are only available once another process <code>wait(2)</code>s for it -- so currently running processes are completely overlooked by the utilities.</p> <p>These utilities may be sufficient though; these utilities is how compute centers billed their clients, back when compute centers were popular...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload