View Single Post

   
  #5 (permalink)  
Old 01-04-2008, 09:29 PM
Steve N.
 
Posts: n/a
Default Re: History depth of the "last" command

Frédéric Normand <fr.normand@laposte.net> wrote in message news:<h05t00tilpuip2o1q8r47s5pgq1esipm95@4ax.com>. ..
> As far as I know, the history of the "last" command is archived in the
> file /var/adm/wtmp.
>
> How can we manage the deep of field of this command ? Is there anay
> parameter of variable as we have HISTFILE for exemple for the
> "history" command ?
>
> Regards


The last command shows the details of the logins since the last reboot
and uses the /var/adm/wtmp file. This file also tracks failed logins I
believe, and so if you get a lot of TTY_HOG or TTY_OVERRUN errors,
this file can get rather large.

What we do on our systems is monitor the size of the file in a cron
job. If it exceeds a predefined limit (say 4MB), we rename the old
file and compress it, then use the nulladm command to resize it back
to zero and it starts fresh.

I know this is not exactly what you wanted, and there may be some
options for limiting the size of the file in of the /etc/security
config files, but since no one responded for a week...better than no
answer at all I guess... ;-)

Steve
Reply With Quote