sa: user accounting initialization failed - FreeBSD 7-stable

Mel fbsd.questions at rachie.is-a-geek.net
Wed Mar 5 14:27:01 UTC 2008


On Wednesday 05 March 2008 03:09:01 George Fazio wrote:
> Lowell Gilbert wrote:
> > George Fazio <gfazio at n3gqf.us> writes:
> >> I'm seeing errors from sa in my daily run output.  I read the man page
> >> for sa(8) and some of the commands that were referenced under the see
> >> also section.  I'm completely lost.  Could anyone point me in the
> >> right direction?
> >>
> >> Here is a snippet of the output from the daily run output
> >>
> >> Rotating accounting logs and gathering statistics:
> >> sa: converting user accounting stats: Inappropriate file type or format
> >> sa: user accounting initialization failed
> >
> > Are you intending to use the system accounting functionality?  If not,
> > you probably don't need the files in /var/account at all (by default,
> > there wouldn't be any).
>
> I probably turned them by accident on while hastily going through the
> install.  My (home) mail server had been down for nearly a week waiting
> for new hardware to arrive, and I probably was not paying quite as much
> attention as I should have been with the base install.  While I do not
> need the accounting feature, I was hoping to understand why it is not
> working to broaden my understanding of how the system functions.  I
> guess I will do some more reading and just disable it if I cannot figure
> it out.

In that case, read the daily script:
It does:
sa -s $daily_account_flags

which processes the file `acct' in /var/account.
If the file cannot be processed, because there's invalid data in there, then 
it will remain so until the file is removed by hand, because the '-s' option 
of sa(8) will not truncate on error.

How invalid data came to exist in the file, could be disk error or maybe OS 
upgrade to 7.x and they changed the format drastically? I have no idea.


-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.


More information about the freebsd-questions mailing list