how to manage /var/adm/wtmpx file?

Hi,

Can I know how did all you you mange the file wtmpx? My Solaris 8 server having this file and it is now grow till 1.5GB.

I would like to know why I cant read this file using vi and cat. Can we remove this file or clean up the content of this file?

Does someone has any ideas?

[314 byte] By [dwarf007] at [2007-11-25 23:40:39]
# 1

The file wtmpx contains the history of user access and administrative information.

The last command looks in the /var/adm/wtmpx file, which records all logins and logouts, for information about a user, a terminal, or any group of users and terminals.

So, if you nuke it, your "last" command will only show logins since the nuke time.

If that's ok, you can nuke it with

cat /dev/null /var/adm/wtmp

cat /dev/null /var/adm/wtmpx

and it will be zero'd. You don't want to just rm it, since the process will be looking for the file. Using /dev/null will zero it without confusing any processes.

Red_Oregon at 2007-7-5 18:48:25 > top of Java-index,General,Sys Admin Best Practices...
# 2
I think the command should be below, I had tested it and it workscat /dev/null > /var/adm/wtmpxCan we have a way to control the file size of this file rather than we manually do house keeping for this file? Can we limit the file size of wtmpx?
dwarf007 at 2007-7-5 18:48:25 > top of Java-index,General,Sys Admin Best Practices...
# 3
Correct, my bad, forgot the redirect.I don't know of a way to set a limit on the size; I would set up a cron for the /dev/null redirect, possibly copying off the old file first.
Red_Oregon at 2007-7-5 18:48:25 > top of Java-index,General,Sys Admin Best Practices...