Operating System - HP-UX
1833467 Members
4044 Online
110052 Solutions
New Discussion

last not working correctly on HP-UX 11.23

 
SOLVED
Go to solution
KPS
Super Advisor

last not working correctly on HP-UX 11.23

Hi,

I have an rx-4640 Itanium that is running HP-UX 11.23. I've noticed something odd that when I run the command "last", it tells me the following:

"Invalid record size. Unable to continue ..."

"lastb" does however work fine. Would anyone know why I'm getting the above message when I run "last"?

Thanks,
KPS
6 REPLIES 6
Pete Randall
Outstanding Contributor
Solution

Re: last not working correctly on HP-UX 11.23

Possibly a corrupt wtmp file. I would null it out and try again:

> /var/adm/wtmp


Pete

Pete
Simon Hargrave
Honored Contributor

Re: last not working correctly on HP-UX 11.23

It sounds like your wtmp file is corrupt.

Use the fwtmp to extract and fix, or simply zero the file if you don't need the history.
Geoff Wild
Honored Contributor

Re: last not working correctly on HP-UX 11.23

I agree - I have 11iv2 systems - and no issue - I would zero out the /var/adm/wtmp file as well....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Kent Ostby
Honored Contributor

Re: last not working correctly on HP-UX 11.23

wtemp is probably corrupt as stated above.

There is a known bug in /sbin/date that can cause this and has been known to lead to the last error you are listing above.

The fix is PHCO_33239
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Devender Khatana
Honored Contributor

Re: last not working correctly on HP-UX 11.23

Hi,

You had to truncate both "/var/adm/wtmps" & "/var/adm/btmps" files as it is HPUx 11.23 & not /var/adm/wtmp & /var/adm/btmp

Here is the relevant thread.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=861310

HTH,
Devender
Impossible itself mentions "I m possible"
KRS_1
Frequent Advisor

Re: last not working correctly on HP-UX 11.23

You have to truncate both "/var/adm/wtmps" & "/var/adm/btmps" files.

NOT /var/adm/wtmp and /var/adm/btmp.

Thanks and regards

KRS