Re: How do I read utmp ??

Sjoerd Mullender (
Mon, 02 May 1994 10:48:36 +0200

On Mon, May 2 1994 Michael Malone wrote:

> Title pretty well says it all. Is there a neat way to read
> entries from the utmp? I am currently doing it by reading
> a block (which I know on my particular system to be 56 bytes)
> and extracting what I want.
> Is there a better way?

The "correct" way to do this would be to implement an interface to the
library routines getutent and friends. Lacking that, the next best
thing is to use the struct built-in module (properly wrapped, of

Sjoerd Mullender, CWI, P.O. Box 94079, 1090 GB Amsterdam, The Netherlands
E-Mail:; Phone: +31 20 592 4127; Fax: +31 20 592 4199
URL: <>