[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1497: acct-alpha-5-7 problems

This is a long, and somewhat belated, response. Please read through it and
give me your comments.

  Marek Michalkiewicz writes:
  Marek> I noticed the following problems with the acct-alpha-5-7 package:
  Marek> - lastcomm and the kernel seem to disagree about sizeof(struct acct)
  Marek> (only every 13th line displayed looks like a valid one).  After the
  Marek> (somewhat garbled) data from the accounting file, lastcomm displays
  Marek> several hundred lines of garbage, and finally gets a SEGV.

I cannot reproduce the SEGV behaviour. But I remember that my machine behaved
similarly at some point in time. This might be due to the fact that there is
some old information in your /var/account/pacct file. Please set this file to
zero, start accounting, execute some commands and try again.
Output from `last' is not well formatted, a better `last' exists. See below.

  Marek> - /etc/init.d/acct prints the usage message when invoked correctly
  Marek> (with "start" or "stop" as the first argument), and doesn't start or
  Marek> stop accounting (but running accton by hand works as expected).  It
  Marek> works after commenting out the ". /etc/init.d/functions" line (which
  Marek> is not necessary here anyway), so I guess maybe something is screwed
  Marek> up in this file (part of sysvinit).

Thanks, I will suppress sourcing of /etc/init.f/functions in the next release.

  Marek> - trying to start accounting again when it is already running gives
  Marek> a message "Process accounting not available on this system", which
  Marek> is a bit confusing (I suggest not to redirect stderr from accton to
  Marek> /dev/null, so that one can see what is really the problem).

Please see acct(2). There is not a lot we can do about it as the acct()
functions returns either 0 or -1. You get -1 for missing accounting support in
the kernel, but also when accounting is already turned on. All I could do is
to change the wording of the message to
    Process accounting not available or already running.
but this could irritate new users considerably.

The REAL problem with acct-alpha is that it doesn't really match the current
kernel. acct-alpha stems from a package that was released in 1993 with url
ftp://alpha.gnu.ai.mit.edu:/gnu/acct-alpha-5.tar.gz. It provides
 ac		report on connect time from `wtmp'
 accton		turn on process accounting
 last		list logins on system
 lastcomm	prints information about previously executed commands
 sa		summarizes info about previously executed commands
but 'sa' can't compile under the current kernel (some struct members missing
in a kernel header file). 'ac' feels buggy (creates output for dates not
included in the wtmp file) and `lastcomm' output is not properly formatted.

 accton		turn on process accounting
 accttrim	trim down size of an account file
 lastcomm	show last command executed in reverse order
The programs work fine, and they have man pages.

I could package acct-1.2.0 instead of acct-alpha and continue to package
`last' as a single package for the base section. I already wrote a man page
for `last'.

We would lose ac, which doesn't work well right now, and sa, which doesn't
work at all. But we would gain a proper, current `acct' package.

Please comment.

Dirk.Eddelbuettel@qed.econ.queensu.ca         http://qed.econ.queensu.ca/~edd

Reply to: