vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| On Wed, 21 Jan 2004 16:03:07 +0100, Frédéric Normand <fr.normand@laposte.net> wrote: >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 Good grief, nobody seems intersted in my question... Where are the gurus..... May be I will polish the magic lamp :-) |
| |||
| Frédéric Normand <fr.normand@laposte.net> wrote in message news:<515f10lhivd9e8ibfd24mlf0ap93m90f44@4ax.com>. .. > On Wed, 21 Jan 2004 16:03:07 +0100, Frédéric Normand > <fr.normand@laposte.net> wrote: > > >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 > > > > Good grief, nobody seems intersted in my question... > Where are the gurus..... > > > May be I will polish the magic lamp :-) The "last" history is stored forever until you clear out the file. |
| |||
| On Wed, Jan 28, 2004 at 11:53:08AM +0100, Frdric Normand wrote: > On Wed, 21 Jan 2004 16:03:07 +0100, Fr?d?ric Normand > <fr.normand@laposte.net> wrote: > > >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 > > > > Good grief, nobody seems intersted in my question... > Where are the gurus..... > > > May be I will polish the magic lamp :-) > You can give the 'last' command a number as an option. ex: last -10 Which will limit the number of results returned. After a brief search through some of the accounting documentation I don't see an obvious way to limit the size of the /var/adm/wtmp file. HTH -- Jon Amundsen nntp@jamundsen.dyndns.org A "No" uttered from deepest conviction is better and greater than a "Yes" merely uttered to please, or what is worse, to avoid trouble. -- Mahatma Ghandi -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQFAF8vot9LdhIcbwtwRAkrbAJ9jN2vxTQl/7guStpm2OdDQCYUkCQCgyhya Ny5yut2N7TUtMzsc7ns4Iwc= =2Jk1 -----END PGP SIGNATURE----- |
| |||
| 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 |
| ||||
| On 28 Jan 2004 09:24:10 -0800, steven_nospam@yahoo.ca (Steve N.) wrote: >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 This solution looks inticing. I will go this way. Thanks to all of you |