Operating System - HP-UX
1837650 Members
3078 Online
110117 Solutions
New Discussion

Memory fault(coredump) error when using 'last' command

 
SOLVED
Go to solution
Simon R Wootton
Regular Advisor

Memory fault(coredump) error when using 'last' command

If I issue a 'last' command

eg. last root

I get a 'Memory fault(coredump)' message. Has anyone seen this before ? Any idea's on cause/rectification ? Could it be to do with the wtmp file ?

ALl help rewarded.
Thanks
Simon
6 REPLIES 6
Pete Randall
Outstanding Contributor
Solution

Re: Memory fault(coredump) error when using 'last' command

Simon,

The usual culprit is a corrupt wtmp file. Try moving it out of the way and re-creating it with "cat /dev/null > /var/adm/wtmp" to see if that cures the problem.


Pete


Pete
James R. Ferguson
Acclaimed Contributor

Re: Memory fault(coredump) error when using 'last' command

Hi Simon:

Yes, it is highly likely that 'var/adm/wtmp' (or perhaps 'var/adm/btmp') is corrupt. You can preserve (copy) both and recreate each to see if the problem disappears. If you find 'wtmp' causes the coredump but not 'btmp' you can restore 'btmp' and null 'wtmp'. To recreate, do:

# cat /dev/null > /var/adm/wtmp
# cat /dev/null > /var/adm/btmp

Regards!

...JRF...

Simon R Wootton
Regular Advisor

Re: Memory fault(coredump) error when using 'last' command

Problem sorted - thanks guys !
Tim Adamson_1
Honored Contributor

Re: Memory fault(coredump) error when using 'last' command

Hi,

It sounds like you may have a corrupt wtmp file or btmp.

Try copying them aside for backup purposes, then zero one out (eg, > wtmp) and try the last command again. If it works then you have found the problem. If not, then zero the other one out and cp the first one back and try again.

Cheers!





Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Steve Steel
Honored Contributor

Re: Memory fault(coredump) error when using 'last' command

Hi

99 percent chance of wtmp problems

look at wtmpfix

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Jim Mills_3
New Member

Re: Memory fault(coredump) error when using 'last' command

I had the same problem and just nulled the wtmp file and it fixed my problem. Thanks.