Operating System - HP-UX
1834144 Members
2092 Online
110064 Solutions
New Discussion

Problem executing "last" command

 
Suraj Singh_1
Trusted Contributor

Problem executing "last" command

Hi all,

I get the following error when i execute "last" command.

Invalid record size. Unable to continue ...

What could be the possible cause? I am unable to figure out..
What we cannot speak about we must pass over in silence.
10 REPLIES 10
Stephen Keane
Honored Contributor

Re: Problem executing "last" command

How big is your /var/adm/wtmp
file ?
Suraj Singh_1
Trusted Contributor

Re: Problem executing "last" command

O/p of "ll /var/adm/wtmp"

-rw-rw-r-- 1 adm adm 2455620 Apr 20 17:01 /var/adm/wtmp
What we cannot speak about we must pass over in silence.
Naveej.K.A
Honored Contributor

Re: Problem executing "last" command

Hi,

Try wtmpfix to fix the /var/adm/wtmp file.

If the last command still doesn't work, create a copy of wtmp file and then do a echo > /var/adm/wtmp to null the file.

Regards,
Naveej
practice makes a man perfect!!!
Suraj Singh_1
Trusted Contributor

Re: Problem executing "last" command

Naveej, wtmpfix as well as trimming /var/adm/wtmp has not made the "last" command work...

Any suffestions would be appreciated..
What we cannot speak about we must pass over in silence.
Henk Geurts
Esteemed Contributor

Re: Problem executing "last" command

hi Suraj.
just an idea :
is the file in use ?
# fuser /var/adm/wtmp

regards.
Stephen Keane
Honored Contributor

Re: Problem executing "last" command

Thanks for the zero points.

Have you also checked /var/adm/btmp, same scenario as /var/adm/wtmp.
Suraj Singh_1
Trusted Contributor

Re: Problem executing "last" command

HI all,

I am able to get the o/p from "lastb" command, but "last" command always gives me the same error (Invalid recird size. Unable to continue...)

Rgds
What we cannot speak about we must pass over in silence.
Suraj Singh_1
Trusted Contributor

Re: Problem executing "last" command

And the file is not in use.
"fuser /var/adm/wtmp" does not show any o/p.

And i am running these commands as superuser.
What we cannot speak about we must pass over in silence.
Devender Khatana
Honored Contributor

Re: Problem executing "last" command

Hi Suraj,

While searching for this I found this important document. Which says there may be corruption in /var/adm/btmp also which may cause last to give some error. Alltough error do not exactly match with yours but still have a look.

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000068499910

HTH,
Devender
Impossible itself mentions "I m possible"
Suraj Singh_1
Trusted Contributor

Re: Problem executing "last" command

Thanks for all your responses...

I had to truncate both "/var/adm/wtmps" & "/var/adm/btmps" files (AND NOT /var/adm/wtmp & /var/adm/btmp )...

Regards,
SUraj
What we cannot speak about we must pass over in silence.