bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test bug in Coreutils


From: Paul Eggert
Subject: Re: Test bug in Coreutils
Date: Mon, 29 Nov 2004 23:59:21 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

"Tinsley, Scott S. (ManTech) CTR" <address@hidden> writes:

>       ../../src/uptime: couldn't get boot time

What is the output of "src/uptime --help"?  It should say something like this:

If FILE is not specified, use /var/adm/utmpx.  /var/adm/wtmpx as FILE is common.

except the file names will differ, e.g., the first file might be
"/etc/utmp" on your host.  Can you see what is in the file
"/etc/utmp", or whatever its name is?  There should be a boot time in
there, in some binary format.  If not, that would explain the problem.

For example, on a Solaris 8 host, the command "od -cx /var/adm/utmpx"
outputs this:

0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
        0000 0000 0000 0000 0000 0000 0000 0000
*
0000040  \0  \0  \0  \0   s   y   s   t   e   m       b   o   o   t  \0
        0000 0000 7379 7374 656d 2062 6f6f 7400
0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
        0000 0000 0000 0000 0000 0000 0000 0000
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \0 002  \0  \0  \0  \0  \0  \0
        0000 0000 0000 0000 0002 0000 0000 0000
0000120   @ 274   u   "  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
        40bc 7522 0000 0000 0000 0000 0000 0000
0000140  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
        0000 0000 0000 0000 0000 0000 0000 0000
...

and since /usr/include/utmp.h contains this line:

#define     BOOT_MSG        "system boot"

uptime knows that the system boot time was 0x40bc7522, which was
2004-06-01 12:22:58 UTC.  HP-UX should have something similar.  At
least, that is what its documentation says.

Possibly your /etc/utmp file is corrupted?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]