The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
wtmpx file aladdin UNIX for Dummies Questions & Answers 3 06-24-2007 10:54 AM
stop wtmpx logging hcclnoodles SUN Solaris 1 04-20-2007 05:31 AM
how to delete entry in file "wtmpx"(/var/adm/wtmpx) arm_naja UNIX for Advanced & Expert Users 4 03-08-2006 01:00 AM
wtmpx finster UNIX for Dummies Questions & Answers 5 06-22-2004 02:46 AM
Urgent problem with wtmpx Peterh UNIX for Dummies Questions & Answers 26 04-11-2003 08:38 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-30-2007
Registered User
 

Join Date: Nov 2005
Posts: 10
Question wtmpx file is too big

Hi,

I am using Sun Solaris 5.9 OS. I have found a file called wtmpx having a size of 5.0 GB. I want to clear this file using :>/var/adm/wtmpx. My query is, would it cause any problem to the running live system.

Could anyone suggest the best method to clear the file without causing problem to the system.

Thanks & Regards,
P.C.Vijayakumar.
Reply With Quote
Forum Sponsor
  #2  
Old 12-30-2007
Registered User
 

Join Date: Sep 2006
Posts: 1,580
Code:
cat /dev/null > /var/adm/wtmpx
cat /dev/null > /var/adm/wtmp
Reply With Quote
  #3  
Old 12-30-2007
Registered User
 

Join Date: Nov 2005
Posts: 10
Question Thanks

Thanks,

would it cause any problem to the running system?

Reg
Vijay
Reply With Quote
  #4  
Old 12-31-2007
Resident BOFH
 

Join Date: Dec 2007
Posts: 262
This will work without executing cat.

Code:
> /var/adm/wtmpx
> /var/adm/wtmp
You may want to backup what you have since it may contain audit data.

I would suggest to compress the files when you do the backup.
ie:
Code:
gzip -c /var/adm/wtmpx >/my/backup/path/wtmpx.gz
gzip -c /var/adm/wtmp >/my/backup/path/wtmp.gz
I would suggest to rotate these files on a regular basis.
Reply With Quote
  #5  
Old 12-31-2007
Registered User
 

Join Date: Nov 2005
Posts: 10
Thanks

Thanks for the help.

Reg,
Vijay
Reply With Quote
  #6  
Old 12-31-2007
Resident BOFH
 

Join Date: Dec 2007
Posts: 262
check the logadm utility. This might work for you.

Code:
logadm          logadm (1m)     - manage endlessly growing log files
Reply With Quote
  #7  
Old 01-04-2008
Registered User
 

Join Date: Dec 2007
Posts: 9
Hi Friend,

Best way is to purge the file

> /var/adm/wtmpx

this command will not effect your system, but you will loss all the information of user who logged in your server before, and first check the permission of file what is that after purging file and befor purging file if it chaged due to some resion then system will not boot after reboot then you need to reboot m/c in sigle user mode and create these empty file with same permission



Thanks
Pravin Landge
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0