This widget could not be displayed.
1859563 Members
8311 Online
110403 Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.

Re: core dump

 
SOLVED
Go to solution
Ade Falusi_1
Occasional Contributor

core dump

I get a Memory fault(coredump) when I try to run /etc.last
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: core dump

Hi Ade:

/var/adm/wtmp is probably corrupt. Either null it or repair it:

To null it entirely and start anew:

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

To attempt to repair it, retaining data, do:

# /usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/wtmp

At this point, you may edit the /tmp/wtmp file, since it is a ASCII file.

# /usr/sbin/acct/fwtmp -ic < /tmp/wtmp > /var/adm/wtmp

...JRF...
federico_3
Honored Contributor

Re: core dump

to read wtmp file do like this:

the following will convert it to ASCII file
#/usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/file
then you can either edit the file or read it.

Then you can convert it back to binary form:
##/usr/sbin/acct/fwtmp -ic < /tmp/file > /var/adm/wtmp


Bye
federico

Ravi_8
Honored Contributor

Re: core dump

Hi,
the wtmp file is corrupted( i feel)
#mv /var/adm/wtmp /var/adm/wtmp.old
#touch /var/adm/wtmp
#mv /var/adm/wtmp.old /var/adm/wtmp

this could solve your problem
never give up
Shahul
Esteemed Contributor

Re: core dump


Hi

Here are only two possibilties. One is ur /etc/last command is corrupted. Or ur /var/adm/wtmp file is not OK. For solving this first U go to /var/adm directory and do this

#cd /var/adm
#cat /dev/null > wtmp
Now try last command. Mostly ur problem will get solved here. If still exists copy /usr/bin/last from some other machine (which should be same version).

I hope now ur problem will be OK.

Best of luck

Shahul