*BSD News Article 95733


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!uunet!in3.uu.net!144.212.100.12!news.mathworks.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!news-xfer.cybernet.dk!newsfeed.de.ibm.net!ibm.net!02-newsfeed.univie.ac.at!03-newsfeed.univie.ac.at!fstgal00.tu-graz.ac.at!not-for-mail
From: dada@sbox.tu-graz.ac.at (Martin Kammerhofer)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Q: Is there something wrong with the 'ac' command
Date: 19 May 1997 18:54:36 GMT
Organization: Graz University of Technology, Austria
Lines: 26
Distribution: world
Message-ID: <5lq7lc$o44@fstgal00.tu-graz.ac.at>
References: <337F45E3.7A97@XXsnet.net> <5lpc49$13c@fstgal00.tu-graz.ac.at> <EAFoCH.vu@sphynx.fdn.fr>
NNTP-Posting-Host: freewill.tu-graz.ac.at
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:41252

Philippe Causse (causse@sphynx.fdn.fr) wrote:
: : FreeBSD's ac is buggy. Guess nowadays it's not much used anymore?
: 
: Strange... I use it here (FreeBSD-2.1.5 , hand-patched 2.1.6) and it
: runs perfectly!
: Note however that connect times are lost each month (when /etc/monthly runs).
: 
: Maybe you don't have read permissions on /var/log/wtmp* or the directory
: /var/log is locked (mode 700)...
: 
: In any case, run the /etc/monthly. It should fix the perms.
: 

The perms are OK, there is a bug - the times reported are way too small.
I guess a few minutes with gdb and I would see clearer.
About a year ago I wrote a little program that takes a time-spec as command
line argument and tells you who was logged in at the time. I remember there
are lots of login records *without* matching logout records in wtmp.

E.g. if you type 'login anotheruser' from your login-shell there will be no
entry in wtmp for logout, just another login record for your line (tty).
My program and last(1) know about that but maybe ac(8) doesn't?
Probably I'd better look at the sources (or use gdb) rather than making wild
guesses here...

Martin