Impacts of emptying /var/adm/wtmp file ?


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 05-23-2009
Impacts of emptying /var/adm/wtmp file ?

In our operating procedures, if a workstation has a space problem in the /var filesystem, one of the most frequent case we were told is the size of the /var/adm/wtmp file.

Someone once told me it is dangerous to do this. Is it ?

I cannot say for certain that whomever wrote that procedure is a qualified sys admin.
# 2  
Old 05-23-2009
I definitely wouldn't delete that file, but reducing it is OK else it'll fill up /var
# 3  
Old 05-23-2009
candlejack is correct. Do not delete the file, because processes are accessing it. instead reduce it to zero length by issuing

Code:
cat /dev/null > /var/adm/wtmp

The difference is that this way the file will keep its inode and hence alle the processes accessing it will still find the file where they look for it.

If you delete the file and it is created anew it would most probably get a different inode, which is a potential hazard.

I hope this helps.

bakunin
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Not logging ftp connections in /var/adm/wtmpx file (in last command output) cepxat UNIX for Advanced & Expert Users 1 11-30-2012 09:38 AM
ftpd failed to write /var/adm/wtmp not owner thecobra151 AIX 1 09-05-2011 06:01 AM
Difference between /var/log/syslog and /var/adm/messages vks47 Solaris 3 06-09-2011 08:55 AM
/var/adm/wtmp - few entries & huge size. robroy AIX 2 12-20-2010 06:08 AM
/var/adm & /var/sadm wkbn86 Solaris 2 12-06-2010 05:08 AM
/var/adm/messages file is missing gkr747 AIX 2 05-24-2010 04:41 PM
/var/adm/meesages file empty fugitive Solaris 2 09-24-2009 03:35 AM
/var/adm/messages file rotation Tirmazi Solaris 2 08-28-2009 02:50 PM
diff b/w /var/log/syslog and /var/adm/messages tv.praveenkumar Solaris 2 08-19-2009 11:33 AM
/var/adm/messages finster Solaris 6 02-09-2009 07:58 AM
/var/adm/messages bullz26 Solaris 5 09-17-2008 02:00 AM
/var/adm/messages FrankC UNIX for Dummies Questions & Answers 3 09-18-2006 11:25 AM
var/adm/cron thumsup9 UNIX for Dummies Questions & Answers 1 03-04-2005 03:28 PM
HELP! The '/var/adm/message' file increase every few seconds??? cloudsmell UNIX for Dummies Questions & Answers 3 09-17-2002 02:04 PM
HELP! The '/var/adm/message' file increase every few seconds??? cloudsmell Filesystems, Disks and Memory 1 09-16-2002 09:31 PM