- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: last command not working?
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
Forums
Discussions
Discussions
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
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
11-24-2008 06:42 AM
11-24-2008 06:42 AM
last command not working?
last
Invalid record size. Unable to continue ..
I have strings wtmp, its giving normal output.
Can some one give me some clue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2008 06:47 AM
11-24-2008 06:47 AM
Re: last command not working?
"last" expects records in a specific format, while "strings" simply reads a record and translates to printable, having no knowledge of any specific record format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2008 06:49 AM
11-24-2008 06:49 AM
Re: last command not working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2008 06:56 AM
11-24-2008 06:56 AM
Re: last command not working?
If you want to empty the file and do not need the existing informations.
# cat /dev/null > /var/adm/wtmp
or
# >/var/adm/wtmp
If you want to fix the wtmp file, refer below threat.
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1227538440018+28353475&threadId=1003618
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2008 06:57 AM
11-24-2008 06:57 AM
Re: last command not working?
> Can we fix it?
Either trim the 'wtmp'file to null and let it begin accumulating data again, or trim the file *until* your inability to run 'last' vanishes:
# /usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/wtmp
...edit text and rebuild binary:
# /usr/sbin/acct/fwtmp -ic < /tmp/wtmp > /var/adm/wtmp
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2008 02:35 PM
11-24-2008 02:35 PM
Re: last command not working?
last -X -f /var/adm/wtmps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2008 11:08 PM
11-24-2008 11:08 PM
Re: last command not working?
I think last command is not able to read /var/adm/wtmp better trim your wtmp file and check
to trim wtmp I am using :
>/var/adm/wtmp
logout from server then login and try last command.
Suraj