- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- wtmps file size
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
тАО04-16-2010 02:57 AM
тАО04-16-2010 02:57 AM
I have wtmps file about 1,5G size, but 'last' command shows only about 150 entries. Why it so big?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2010 03:01 AM
тАО04-16-2010 03:01 AM
Re: wtmps file size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2010 03:04 AM
тАО04-16-2010 03:04 AM
Re: wtmps file size
what is the output of
last -R
To nullify wtmp dont delete and recreate use
>wtmp
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2010 03:07 AM
тАО04-16-2010 03:07 AM
Re: wtmps file size
I've found possible reason of fast growing of wtmps -- system makes a lot of sftp connections, which possibly logged into wtmps.
How to prohibit sftp sessions logging?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2010 03:09 AM
тАО04-16-2010 03:09 AM
Re: wtmps file size
Perhaps it is corrupted because you ran out of space once and last(1) stops too soon?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2010 03:33 AM
тАО04-16-2010 03:33 AM
Re: wtmps file size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2010 04:06 AM
тАО04-16-2010 04:06 AM
Solutiondu -kx /var | sort -rn | head -20
When a particular directory grows too large, cd to the directory and sort the files by size:
cd /var/adm
ll | sort -rnk5 | head -20
The /var/adm/wtmp* and /var/adm/btmp* files cannot be edited directly so the easiest is to simply remove all the records:
cat /dev/null > /var/adm/wtmpx
cat /dev/null > /var/adm/btmpx
(earlier versions of HP-UX will use wtmp and btmp). Do this when the system is not running any applications or has any users logged in.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2010 12:38 PM
тАО04-18-2010 12:38 PM
Re: wtmps file size
Another option (if you have many machines) could be to install a logrotate type service.
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/
And another option (again depending on the size and activity of your unix machines) would be to install or designate a server as a logging host. We do that here so we can trim syslog files but have a copy elsewhere for audit purposes. Check syslog's manpage and syslog-ng.