BSD‎ > ‎FreeBSD‎ > ‎

Process Accounting

FreeBSD

to enable process accounting use:

# touch /var/account/acct # accton /var/account/acct # echo 'accounting_enable="YES"' >> /etc/rc.conf

After running your system for some time (to let a bit of logging information accumulate), you can then use the 'lastcomm' command to get information about user activity. E.g.:

# lastcomm rainer

may yield information like:

bash F rainer stderr 0.00 secs Wed Dec 27 12:12 sed rainer stderr 0.01 secs Wed Dec 27 12:12 bash F rainer stderr 0.00 secs Wed Dec 27 12:12 bash F rainer stderr 0.00 secs Wed Dec 27 12:12 tr rainer stderr 0.01 secs Wed Dec 27 12:12 wc rainer stderr 0.00 secs Wed Dec 27 12:12 ...
Comments