AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  "last " command

    Posted Tue August 25, 2009 03:25 AM

    Originally posted by: SystemAdmin


    Hi friends,

    i have a small problem, can anyone help me.

    In my AIX5.3 boxs , the last command is not showing the latest information.when i execute the last command in my box, it is showing the old login,logout,shoutdown details. Its not showing latest information.

    what is the problem , what can i do . anyone help me.
    #AIX-Forum


  • 2.  Re: "last " command

    Posted Tue August 25, 2009 07:51 AM

    Originally posted by: l2abe


    Read the man page for the "last" command.
    You will see that the informations displaied by the command are taken from the /var/adm/wtmp file so it is possible the file is corrupted.
    The wtmp file grows up indefinitely so you must ensure /var is not full.
    By the way can use the the "nulladm" command in order to cleanup and recreate the wtmp file or eventually copying /dev/null over wtmp itself eg:

    /usr/sbin/acct/nulladm /var/adm/wtmp

    or

    cp /dev/null /var/adm/wtmp

    Make a search in internet and you will find a lot pages explaining how to maintain the wtmp file.
    #AIX-Forum