Subject: Re: Text form of wtmp
To: None <tech-userlevel@NetBSD.org>
From: Ignatios Souvatzis <is@netbsd.org>
List: tech-userlevel
Date: 02/16/2005 14:18:27
--MfFXiAuoTsnnDAfZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Feb 16, 2005 at 02:12:49PM +0200, Valentin Nechayev wrote:
>  Tue, Feb 15, 2005 at 16:40:44, greywolf wrote about "Re: Text form of wt=
mp":=20
>=20
> VS>> Why can't we use text file for wtmp? wtmp is just a log file, that is
> VS>> similar to other log files in system. We need to fix only last and ac
> VS>> programmes and libutil routines to work with text wtmp. I understand,
> VS>> that analyzing of wtmp records would be more complex, but wtmp would=
 be
> VS>> in human readable form. And we would not need to trim hostname, beca=
use
> VS>> even in wtmpx the maximum hostname length is 256 bytes, and real max
> VS>> length is 1024 bytes.
> > wtmp is a binary file with fixed length records because it makes for mu=
ch
> > faster processing.
>=20
> Does faster processing really gives anything important in that particular
> case? There are too few tasks which require automatic reading of wtmp.
> First law of optimization says "Don't optimize unless really needed".

I hope you're aware how those records are searched, displayed, and updated.
E.g. lastlog is mostly searched _backwards_. Not good without record sizes=
=20
at the end of the line... or fixed sizes records.

Also, you should consider that not all machines are single-effective-user
desktop machines.

	-is

--MfFXiAuoTsnnDAfZ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFCE0giN4tiz3B8hB0RAkoAAJ4pyfkwTmddWGDi1L2bAjSB15VBNgCg21dE
jnqvYp1+bd2GxWJs9NN5R8Q=
=pqX7
-----END PGP SIGNATURE-----

--MfFXiAuoTsnnDAfZ--