Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 318681 - sys-process/acct-6.5.1, wrong path: /var/log/account/pacct
Summary: sys-process/acct-6.5.1, wrong path: /var/log/account/pacct
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 316517
Blocks:
  Show dependency tree
 
Reported: 2010-05-05 20:57 UTC by Łukasz Stelmach
Modified: 2010-05-11 02:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Stelmach 2010-05-05 20:57:44 UTC
By default acct is configured (/etc/conf.d/acct) to store accounting info in /var/log/account/pacct while /usr/sbin/sa utility tries to open /var/log/account/pacct.

Reproducible: Always

Steps to Reproduce:
1. install sys-process/acct
2. run "sa"


Actual Results:  
couldn't open file '/var/log/account/pacct': No such file or directory


Expected Results:  
something like

       1       0.02re       0.00cp         0avio      2916k   runscript.sh
       6       0.00re       0.00cp         0avio      1928k   bzip2
       5       0.00re       0.00cp         0avio       956k   sa
       4       0.21re       0.00cp         0avio      2744k   sh*
       2       0.21re       0.00cp         0avio      1481k   man
       2       0.21re       0.00cp         0avio      2744k   sh
       2       0.21re       0.00cp         0avio      2576k   less
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-05-11 02:20:45 UTC
I don't see a bug here.

By default /var/account/pacct is used and that's also what the conf.d, init.d and logrotate.d files in $FILESDIR use.

Furthermore, neither sa(1) or acct(5) suggest a specific raw log file path to use.

Maybe you can explain why you _expect_ the file to be at /var/log/account/pacct (for example because other distros happen to put it there).
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2010-05-11 02:40:38 UTC
Ah. Between 6.5.1 and 6.5.3, ACCT_FILE was changed:

--- acct-6.5.1/work/acct-6.5.1/configure        2009-09-06 20:06:58.000000000 +0200
+++ acct-6.5.3/work/acct-6.5.3/configure        2010-01-23 21:55:19.000000000 +0100
@@ -21351,10 +24883,10 @@
 
 #ifndef ACCT_FILE
 #  if defined(__FreeBSD__) || defined(__linux__)
-#    define ACCT_FILE "/var/log/account/pacct"
+#    define ACCT_FILE "/var/account/pacct"
 #  else
 #    if defined(__NetBSD__)
-#      define ACCT_FILE "/var/log/account/acct"
+#      define ACCT_FILE "/var/account/acct"
 #    else
 #      if defined(sun) || defined(AMIX)
 #        define ACCT_FILE "/var/adm/pacct"


Regrettably, the NEWS file only records this:
New in 6.5.3:

  * Merged patches from Debian and Red Hat.

Meanwhile, the ChangeLog (which is ancient according to the NEWS file), this was supposedly fixed some fifteen years ago:

Pre Sep 21 00:00:00 1995  Ian Murdock  <imurdock@debian.org>

        * added __linux__ definitions to files.h (we use
        /var/account/pacct as ACCT_FILE, /var/account/wtmp as WTMP_FILE,
        /var/account/savacct as SAVACCT_FILE, and /var/account/usracct as
        USRACCT_FILE)


So now that we've exhaustingly figured out the cause, let's celebrate bug #316517, which will have us all switch to 6.5.4 in the near future.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-05-11 02:43:19 UTC
In the mean time, by the way, you can work around the problem by passing the proper file path to `sa' as an argument.