hackeron
01-03-2004, 02:20 PM
Hey,
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 problems:
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)
3) Doesn't display seconds
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 that works .
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 problems:
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)
3) Doesn't display seconds
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 that works .