2004-01-03 18:47:32

by Roman Gaufman

[permalink] [raw]
Subject: Truncated 'last' output, please help!

Hello,

This is my first message. I am having problems with the 'last' command which
is part of the package found on:
http://www.kernel.org/pub/linux/utils/util-linux/

I have the following bug reports:
1) It truncates username to 8 characters, potpockey becomes potpocke
2) any truncated output cannot be fixed with awk or cut
(example ps: aux | awk '{ print $11 } fixes truncated output for ps)

and following feature requests: pretty please :)
1) Seconds support is a must for me
2) General output modification without parsing

Could someone please provide a fix or an alternative, because I highly require
this functionality of being able to get a list of:
Login time , Login duration, IP and Username and require seconds support
(Login times either as timestamp or date with seconds will do, but need
seconds)

I tried searching for parsing /var/wtmp with perl and other related keywords
to wtmp, but cannot find anything :(.

I'm currently just looking at source code for last while reading some C
tutorials and trying to make a fix, but I'm sure anything I write won't be
near as elegant comming for a C noob such as myself, but am willing to try if
needed.