System Accounting October 27, 2005

Looking over my notes from Mor’s queuing theory class, I just remembered system accounting is not enabled on any of my computers. When system accounting is enabled, the lastcomm gives a information about previously executed jobs. This is how Mor got the profiles of Unix job sizes used in “Exploiting Process Lifetime Distributions for Dynamic Load Balancing”, Mor Harchol-Balter and Allen B. Downey, ACM Transactions on Computer Systems, 1997.

sudo mkdir /var/account
sudo touch /var/account/acct
sudo accton /var/account/acct

The /etc/rc on most BSD systems (I checked OpenBSD and MacOS 10.4) will start accton when the system reboots once the /var/account/acct file exists. After activating system accounting and a little activity on my part (looking at a few man pages), here is the output of lastcomm:

man        -       pip      ttyp2      0.02 secs Thu Oct 27 09:55 (0:00:02.86)
sh         -       pip      ttyp2      0.00 secs Thu Oct 27 09:55 (0:00:02.48)
sh         -F      pip      ttyp2      0.00 secs Thu Oct 27 09:55 (0:00:02.45)
less       -       pip      ttyp2      0.00 secs Thu Oct 27 09:55 (0:00:02.45)
groff      -       pip      ttyp2      0.00 secs Thu Oct 27 09:55 (0:00:00.14)
grotty     -       pip      ttyp2      0.00 secs Thu Oct 27 09:55 (0:00:00.12)
troff      -       pip      ttyp2      0.08 secs Thu Oct 27 09:55 (0:00:00.11)
tbl        -       pip      ttyp2      0.00 secs Thu Oct 27 09:55 (0:00:00.00)
man        -       pip      ttyp2      0.03 secs Thu Oct 27 09:54 (0:00:10.25)
sh         -       pip      ttyp2      0.00 secs Thu Oct 27 09:54 (0:00:10.20)
sh         -F      pip      ttyp2      0.00 secs Thu Oct 27 09:54 (0:00:10.17)
less       -       pip      ttyp2      0.00 secs Thu Oct 27 09:54 (0:00:10.17)
groff      -       pip      ttyp2      0.00 secs Thu Oct 27 09:54 (0:00:00.12)
grotty     -       pip      ttyp2      0.00 secs Thu Oct 27 09:54 (0:00:00.11)
troff      -       pip      ttyp2      0.06 secs Thu Oct 27 09:54 (0:00:00.09)
tbl        -       pip      ttyp2      0.00 secs Thu Oct 27 09:54 (0:00:00.00)
SyncServer -       pip      __         0.45 secs Thu Oct 27 09:42 (0:10:01.88)
man        -       pip      ttyp2      0.08 secs Thu Oct 27 09:52 (0:00:05.41)
sh         -       pip      ttyp2      0.00 secs Thu Oct 27 09:52 (0:00:04.42)
sh         -F      pip      ttyp2      0.00 secs Thu Oct 27 09:52 (0:00:04.41)
less       -       pip      ttyp2      0.00 secs Thu Oct 27 09:52 (0:00:04.41)
groff      -       pip      ttyp2      0.00 secs Thu Oct 27 09:52 (0:00:00.66)
grotty     -       pip      ttyp2      0.00 secs Thu Oct 27 09:52 (0:00:00.47)
troff      -       pip      ttyp2      0.08 secs Thu Oct 27 09:52 (0:00:00.45)
tbl        -       pip      ttyp2      0.00 secs Thu Oct 27 09:52 (0:00:00.12)
lastcomm   -       pip      ttyp2      0.00 secs Thu Oct 27 09:50 (0:00:00.00)
ps         -S      pip      ttyp2      0.00 secs Thu Oct 27 09:50 (0:00:00.06)
lastcomm   -       pip      ttyp2      0.00 secs Thu Oct 27 09:50 (0:00:00.05)
accton     -S      root     ttyp2      0.00 secs Thu Oct 27 09:50 (0:00:00.06)

It would be interesting to study, now that this is activated, what the distribution of job sizes on Mac OS 10.4 is.

After bringing up the new gemüsehaken subversion server, I updated the etc/weekly and etc/newsyslog as suggested in ac(8), so accounting summaries will be emailed every week. Over the life of this server,
we’ll now have detailed accounting logs.

sa(8) provides summaries in a much more usable (for our purposes) format than lastcomm.

Tags
Conversation
Related Tags
Comments
Trackback


Leave a Reply

You must be logged in to post a comment.

This entry was posted on Thursday, October 27th, 2005 at 6:04 am. You can follow any responses to this entry through the RSS 2.0 feed. If you're wondering how to get your own icon next to your comment, go visit gravatar.com and get yourself hooked up.
 steal compass, drive north, disappear...