- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: File /var/adm/wtmp Cleanup
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2005 02:14 AM
тАО02-25-2005 02:14 AM
Thank you,
Paul Walztoni
Moraine Valley Community College
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2005 02:18 AM
тАО02-25-2005 02:18 AM
Re: File /var/adm/wtmp Cleanup
The easiest way is:
> wtmp
It's also the most efficient as far as reclaiming space goes, but a much safer way is fwtmp:
man fwtmp
should tell you what you need to know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2005 02:20 AM
тАО02-25-2005 02:20 AM
SolutionBackup the file or compress.
> /var/adm/wtmp
cp /dev/null /var/adm/wtmp
Sometimes it gros because of following.
The /var/adm/wtmp file on the systems which do not have graphics console will
grow too and fill up the /var file system.
This is because, the X session tries to open the session on the graphic
console. And since it does not have a Graphics Console, it fails. All these
incidents are logged on to /var/adm/wtmp file.
To prevent this from happening.
1) Edit the file
/etc/dt/config/Xservers
and comment out the line which states
* Local local@console /usr/bin/X11/X :0
[ This is usually the last line in the file ].
2) Restart the cde server by
/usr/dt/bin/dtconfig -reset
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2005 02:21 AM
тАО02-25-2005 02:21 AM
Re: File /var/adm/wtmp Cleanup
You can also trim the logs in SAM.
SAM > Routine Taks > System Logs > select your log file > Action > trim > Trim to Zero ...
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2005 02:22 AM
тАО02-25-2005 02:22 AM
Re: File /var/adm/wtmp Cleanup
To make a file null you can do
> filename or cat /dev/null >filename.
Rgds
HGN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2005 02:22 AM
тАО02-25-2005 02:22 AM
Re: File /var/adm/wtmp Cleanup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2005 02:39 AM
тАО02-25-2005 02:39 AM
Re: File /var/adm/wtmp Cleanup
You can use wtmpfix and fwtmp command as follows
cp /var/adm/wtmp > /tmp/wtmp
wtmpfix /tmp/wtmp | fwtmp | tail -200 | fwtmp -ic > /var/adm/wtmp
Here wtmpfix is fixing date and time stamps, fwtmp is converting from binary to ascii, Then we are taking last 200 lines and converting back to binary using ic flag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2005 02:50 AM
тАО02-25-2005 02:50 AM
Re: File /var/adm/wtmp Cleanup
Everyone have a great weekend,
Paul Walztoni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2005 02:54 AM
тАО02-25-2005 02:54 AM
Re: File /var/adm/wtmp Cleanup
It's snowing here, I need a bigger hat! :o)