How can I filter /var/adm/wtmpx on Solaris 10?
Posted
by
Yanick Girouard
on Server Fault
See other posts from Server Fault
or by Yanick Girouard
Published on 2012-03-12T18:24:06Z
Indexed on
2013/11/13
10:00 UTC
Read the original article
Hit count: 621
Some of our Solaris 10 servers are monitored using SiteScope, which uses Telnet to probe certain ports (SSH is one of them) every few minutes. This is creating an insane amount of lines in /var/adm/wtmpx, and eventually make it so big (2,5G+) that we can no longer run the last
command, or that the uptime
command is unable to accurately show the true uptime of the server.
The error we get when trying to run the last
command is this:
/var/adm/wtmpx: Value too large for defined data type
I have found ways we can clean this accounting log using a cron job (with the command /usr/lib/acct/fwtmp
), and this works. This is not the issue. I was wondering if there would be a way to simply prevent connections from the monitoring user (in our case, user monsite
) from creating entries in this accounting log at all.
Is this possible, and if so, how can I do it?
I've looked around and searched Google for a while, but couldn't find an answer to this question.
NOTE: We are very well aware that the monitoring solution we employ is perhaps not the best one, but we cannot change it at this time. Therefore, suggesting that we change it is not pertinent to this question. If you want to read more on the Sitescope monitoring solution we employ for those servers, please see its documentation here and look for Port Monitor, and Connecting to remote UNIX servers, which explains how it works.
© Server Fault or respective owner