-
Notifications
You must be signed in to change notification settings - Fork 0
RecentLogins
jheiss edited this page Oct 1, 2012
·
2 revisions
Recent logins are found by parsing the output from the last command. You can specify a list of users to exclude, so that for example a system administrator logging into the box to check things out doesn't affect the system's idleness rating.
RHEL 4 and earlier rotated /var/log/wtmp (the database used by last) monthly. This unnecessarily discards login history on boxes with infrequent logins. We recommend you reconfigure your older RHEL/CentOS systems to rotate wtmp based on file size instead, as is now standard in RHEL 5. I.e. you will find this in /etc/logrotate.conf:
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
Here's the newer configuration from RHEL 5:
/var/log/wtmp {
monthly
minsize 1M
create 0664 root utmp
rotate 1
}