main

about me
pictures
links
events
sitemap
varia
woonkrediet
usage

Webdav
Grub
rpm4fc
aix
OnTrackDM6
VCDX

mirror rootvg
LPP package
sendmail
performance
clean wtmp
syslogd
LDAP

Currently employed @  

( 25.68 )
  > main > varia > AIX > clean wtmp

Howto clean an AIX wtmp log file (/var/adm/wtmp)

This document explains how you can reduce the size of wtmp in a GOOD way
This info is valid for AIX 4.3.3, AIX 5.1, AIX 5.2 and AIX 5.3.

Cleaning of wtmp on AIX is not done by "echo >/var/adm/wtmp". There are 2 supported ways to clean wtmp:

  • cp /dev/null /var/adm/wtmp
  • format /var/adm/wtmp to ASCII text, clean the 'bogus' entrys and convert it back to wtmp format, you can do this by using the tool fwtmp:
    • be sure /tmp has enough space
    • convert the wtmp to ASCII --> /tmp/dummy.file
    • /usr/sbin/acct/fwtmp </var/adm/wtmp >/tmp/dummy.file
    • edit the file /tmp/dummy.file via "grep -v" or just plain vi
    • convert the ASCII output back -->/var/adm/wtmp
    • /usr/sbin/acct/fwtmp -ic <dummy.file >/var/adm/wtmp

Copyright 1997 - 2009 Ramses Smeyers. All rights reserved