From: Alexander Alexandrov (vserver_at_murmansk.net)
Date: Mon 05 May 2003 - 08:25:32 BST
5 νΑΚ 2003 10:01, χΩ ΞΑΠΙΣΑΜΙ:
> Hi,
>
> I run Gentoo vservers and I have just noticed that the file /var/log/wtmp
> inside vservers is growing very large.. On a vserver that has been used for
> 2 months it is 1.9 GB!
This is a real file size, not sparse file?
man 1 du
du -sch /var/log/wtmp
If max UID is too large, size (NOT disk usage!) is too big, because the UIDS
used as database index.
>
> I am not sure what this file is used for. It is in binary format and seems
> to keep a log of logins / logouts of the users.. On the host system, this
> file is only 646k..
Not only logins / logouts of the users - more events (as system boots, ftp
logins etc) store here.
>
> Anybody noticed similar behavior? Do you think it is safe to delete these
> outrageously large files? Why do they grow so large inside vservers?
This file is safe to delete, but after this syslogd needs to reload:
# service syslogd reload
or
# killall -HUP syslogd
-- Best regards, Alexander Alexandrov, Murmansk, Russian Federation