AIX

AIX

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

 View Only
Expand all | Collapse all

/var/adm/wtmp - few entries & huge size.

  • 1.  /var/adm/wtmp - few entries & huge size.

    Posted Mon December 20, 2010 03:53 AM

    Originally posted by: robroy83


    Hi all.

    I have a strange case on one of my AIX boxes. /var/adm/wtmp on server01 is ~ 400MB large but it only has ~1200 lines. For example on server02 there are ~85000 lines and the file is ~158MB large. I check lines through 'last | wc -l'. But when I check line directly with 'wc -l /var/adm/wtmp' for server01 I have 22483 lines and for server02 10575 lines. Quite strange for me

    What should be checked? Where is the strange difference comming from?


  • 2.  Re: /var/adm/wtmp - few entries & huge size.

    Posted Mon December 20, 2010 10:58 AM

    Originally posted by: shargus


    /var/adm/wtmp is a binary formatted file. Because of the binary codes, it's confusing wc.
    The "last" command is formatting the binary file into text that wc can handle.