Empty wtmpx on Solaris

This article is a how to empty or remove /var/adm wtmpx  from a Solaris system.

In case you have same spare space to create an intermediate wtmpx before you empty the existing one follow the procedure below:

# /usr/lib/acct/fwtmp < /var/adm/wtmpx > /tmp/wtmpx.bak
# cat /dev/null > wtmpx
# gzip /tmp/wtmpx.bak
# mv /tmp/wtmpx.bak.gz /var/adm/wtmpx.`date +%Y%m%d`.gz

In case there is no space left and you cannot do a thing to release some temporary space just do

# cat /dev/null > wtmpx

Leave a Reply

Your email address will not be published. Required fields are marked *

Prove me that you are not a robot :) * Time limit is exhausted. Please reload the CAPTCHA.