使用last报Value too large解决


使用last报Value too large解决
 
$ last | more
/var/adm/wtmpx: Value too large for defined data type
# cd /var/adm
# /usr/lib/acct/fwtmp < wtmpx > wtmpx.ascii
 
edit wtmpx.ascii by "vi" or "tail" 
 
# /usr/lib/acct/fwtmp -ic < wtmpx.ascii > wtmpx
# rm wtmpx.ascii
 
——————————————————————
 
# cp /var/adm/wtmpx /var/adm/wtmpx.old
# > /var/adm/wtmpx
 
按照这个方法清空了wtmpx文件
 
ksh下
 
# logadm -w wtmpx -c -C 3 -p 1m /var/adm/wtmpx
Where :
 
-w writes an entry in the /etc/logadm.conf file with entry name "wtmpx".
-c is a flag to copy and then truncate the file
-C is the number of copies to keep
-p is the retention period (one month here)
可以限制last保存的时长
 
另外,LINUX下的last文件可在/var/log/下的wtmp文件中找到。
 

相关内容

    暂无相关文章