System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

/var/adm/wtmps and /var/adm/wtmp

SOLVED
Go to solution
Lisa Sorbo
Frequent Advisor

/var/adm/wtmps and /var/adm/wtmp

running:HP-UX B.11.23 U ia64

It appears that no new logins have been logged since Dec 2007. /var/adm/wtmps file is huge. I'm assuming its size is the problem.

-rw------- 1 root other 0 Apr 21 14:12 btmp
-rw------- 1 root other 1053726540 Apr 22 10:23 btmps
-rw-rw-r-- 1 adm adm 240 Apr 22 09:11 wtmp
-rw-rw-r-- 1 adm adm 2147483647 Dec 12 2007 wtmps
-rw-r--r-- 1 root sys 280 Feb 8 01:39 wtmpx



Can I fix by just cat /dev/null > /var/adm/wtmps?

What is the /var/adm/wtmp file?

What is the best way to archive these files - just a copy command and then tar up the copy?

Can I assume whatever you say is also true for btmps and btmp respectively?
5 REPLIES
Pete Randall
Outstanding Contributor

Re: /var/adm/wtmps and /var/adm/wtmp

Yes, null out the file(s) by doing

> /var/adm/wtmps

Save recent entries first if you wish.

A quick perusal of the man page (man 4 wtmp) will identify the usage for these files.


Pete

Pete
Bijeesh
Respected Contributor

Re: /var/adm/wtmps and /var/adm/wtmp

Lisa Sorbo
Frequent Advisor

Re: /var/adm/wtmps and /var/adm/wtmp

thanks for the input.

I have read the man pages for wtmps and btmps and understand their usage.

I was curious about the wtmp and btmp (no s suffix) as the entry in the man page seems to say that these are obsolete. But I have them on the system and they have recent dates and tiny sizes. Hence my question about their use when wtmps and btmps seem to be the actual logs.
Pete Randall
Outstanding Contributor
Solution

Re: /var/adm/wtmps and /var/adm/wtmp

Lisa Sorbo
Frequent Advisor

Re: /var/adm/wtmps and /var/adm/wtmp

thanks.