Uptime not displaying how long the system has up - SUN

This is a discussion on Uptime not displaying how long the system has up - SUN ; When running Uptme all I get is the following 11:11am 1 user, load average: 0.27, 0.37, 0.38 It does not show how long the system has been up. I am running Solaris 8. Also, "who -b" and "who -r" return ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Uptime not displaying how long the system has up

  1. Uptime not displaying how long the system has up

    When running Uptme all I get is the following

    11:11am 1 user, load average: 0.27, 0.37, 0.38

    It does not show how long the system has been up. I am running Solaris
    8.

    Also, "who -b" and "who -r" return nothing.

    Any ideas????

    Thanks,

    Paka


  2. Re: Uptime not displaying how long the system has up

    crwilton@gmail.com wrote:
    > When running Uptme all I get is the following
    >
    > 11:11am 1 user, load average: 0.27, 0.37, 0.38
    >
    > It does not show how long the system has been up. I am running Solaris
    > 8.
    >
    > Also, "who -b" and "who -r" return nothing.
    >
    > Any ideas????
    >
    > Thanks,
    >
    > Paka
    >

    I don't have a Solaris 8 box to check, but what version of uptime is it.

    /usr/bin/uptime

    or something else?



    --
    Dave K

    http://www.southminster-branch-line.org.uk/

    Please note my email address changes periodically to avoid spam.
    It is always of the form: month-year@domain. Hitting reply will work
    for a couple of months only. Later set it manually. The month is
    always written in 3 letters (e.g. Jan, not January etc)

  3. Re: Uptime not displaying how long the system has up

    Dave (from the UK) wrote:
    > crwilton@gmail.com wrote:
    >
    >> When running Uptme all I get is the following
    >>
    >> 11:11am 1 user, load average: 0.27, 0.37, 0.38
    >>
    >> It does not show how long the system has been up. I am running Solaris
    >> 8.
    >>
    >> Also, "who -b" and "who -r" return nothing.
    >>
    >> Any ideas????
    >>
    >> Thanks,
    >>
    >> Paka
    >>

    > I don't have a Solaris 8 box to check, but what version of uptime is it.
    >
    > /usr/bin/uptime
    >
    > or something else?
    >
    >
    >

    Then I remembered, I do have access to some machines elsewhere with
    Solaris 8. As you can see, this Solaris 8 machine shows the uptime.

    brown /home/duke/drkirkby % uname -a
    SunOS brown 5.8 Generic_117350-13 sun4u sparc SUNW,Ultra-5_10

    brown /home/duke/drkirkby % /usr/bin/uptime
    6:07pm up 71 day(s), 2:38, 1 user, load average: 0.02, 0.03, 0.03

    brown /home/duke/drkirkby % cat /etc/release
    Solaris 8 s28_38shwp2 SPARC
    Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
    Assembled 21 January 2000


    --
    Dave K

    http://www.southminster-branch-line.org.uk/

    Please note my email address changes periodically to avoid spam.
    It is always of the form: month-year@domain. Hitting reply will work
    for a couple of months only. Later set it manually. The month is
    always written in 3 letters (e.g. Jan, not January etc)

  4. Re: Uptime not displaying how long the system has up

    Yes...it is /usr/bin/uptime


    /usr/bin/uptime
    12:47pm 1 user, load average: 0.50, 0.36, 0.34

    cat /etc/release
    Solaris 8 10/01 s28s_u6wos_08a SPARC
    Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
    Assembled 12 September 2001


  5. Re: Uptime not displaying how long the system has up

    crwilton@gmail.com wrote:
    > Yes...it is /usr/bin/uptime
    >
    >
    > /usr/bin/uptime
    > 12:47pm 1 user, load average: 0.50, 0.36, 0.34
    >
    > cat /etc/release
    > Solaris 8 10/01 s28s_u6wos_08a SPARC
    > Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
    > Assembled 12 September 2001
    >

    I don't know.

    Try uptime --help

    so see if it looks like a GNU type program, in case someone has replaced
    the Sun one.

    I tried 3 other Solaris 8 boxes and *all* print the uptime in days.
    However, the 3 I tried are all the same release, but is older than your
    Solaris 8 version.

    I would be tempted to get an md5 checksum and submit it to the Solaris
    fingerprint database online, just in case someone has replaced it with
    something non-Sun.


    dizzy /home/duke/drkirkby % cat /etc/release
    Solaris 8 s28_38shwp2 SPARC
    Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
    Assembled 21 January 2000
    dizzy /home/duke/drkirkby % /usr/bin/uptime
    7:24pm up 97 day(s), 8:58, 1 user, load average: 0.08, 0.02, 0.02



    mgi1 /home/duke/drkirkby % uname -a
    SunOS mgi1 5.8 Generic_117350-13 sun4u sparc SUNW,Ultra-5_10
    mgi1 /home/duke/drkirkby % uptime
    7:26pm up 238 day(s), 8:35, 1 user, load average: 0.00, 0.00, 0.01
    mgi1 /home/duke/drkirkby % cat /etc/release
    Solaris 8 s28_38shwp2 SPARC
    Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
    Assembled 21 January 2000



    aretha /home/duke/drkirkby % uname -a
    SunOS aretha 5.8 Generic_117350-13 sun4u sparc SUNW,Ultra-5_10
    aretha /home/duke/drkirkby % uptime
    7:28pm up 85 day(s), 9:07, 1 user, load average: 0.00, 0.00, 0.01
    aretha /home/duke/drkirkby %
    aretha /home/duke/drkirkby %
    aretha /home/duke/drkirkby % cat /etc/release
    Solaris 8 s28_38shwp2 SPARC
    Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
    Assembled 21 January 2000


    --
    Dave K

    http://www.southminster-branch-line.org.uk/

    Please note my email address changes periodically to avoid spam.
    It is always of the form: month-year@domain. Hitting reply will work
    for a couple of months only. Later set it manually. The month is
    always written in 3 letters (e.g. Jan, not January etc)

  6. Re: Uptime not displaying how long the system has up

    Check that utmpx is ok and can be read:

    spiff:~ (212)>truss -t open,read uptime
    open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
    open("/lib/libc.so.1", O_RDONLY) = 3
    open("/proc/self/auxv", O_RDONLY) = 3
    read(3, "D807\0\0E37F04\bDE07\0\0".., 168) = 168
    open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
    open("/lib/libc.so.1", O_RDONLY) = 3
    open("/var/adm/utmpx", O_RDWR|O_CREAT, 0644) = 3
    open("/var/adm/utmpx", O_RDWR) = 4
    read(4, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192) = 3720
    read(4, 0x080722EC, 8192) = 0
    open("/usr/share/lib/zoneinfo/Europe/Stockholm", O_RDONLY) = 3
    read(3, " T Z i f\0\0\0\0\0\0\0\0".., 675) = 675
    8:50pm up 4 day(s), 21:29, 1 user, load average: 0.20, 0.39, 0.35

    This is from a Solaris nevada system, but I don't think this has been
    changed significantly since solaris 8.

    Thomas

  7. Re: Uptime not displaying how long the system has up

    On 24 Jan 2006 09:09:28 -0800
    crwilton@gmail.com wrote:

    > When running Uptme all I get is the following
    >
    > 11:11am 1 user, load average: 0.27, 0.37, 0.38
    >
    > It does not show how long the system has been up. I am running
    > Solaris
    > 8.
    >
    > Also, "who -b" and "who -r" return nothing.
    >
    > Any ideas????
    >

    That means that /var/adm/utmpx is not readable. Usually,
    /usr/bin/sparcv9/uptime is a setuid executable, but if the box
    has been hardened, both user access to /var/adm and the setuid status
    of less-than-vital utilities would have been revoked. The fact that
    "who -r" and "who -b" return nothing also indicates that /var/adm/utmpx
    is not accessible to the user running the "who" command.

    Take care,

    --
    Stefaan
    --
    As complexity rises, precise statements lose meaning,
    and meaningful statements lose precision. -- Lotfi Zadeh

  8. Re: Uptime not displaying how long the system has up

    crwilton@gmail.com wrote:
    > When running Uptme all I get is the following
    >
    > 11:11am 1 user, load average: 0.27, 0.37, 0.38
    >
    > It does not show how long the system has been up. I am running Solaris
    > 8.
    >
    > Also, "who -b" and "who -r" return nothing.


    /var/adm/utmpx has been corrupted and was rebuilt.

    "uptime", "who -b/-r" just read /var/adm/utmpx for the right entry (which
    have been written by init resp. svc.startd)

    You can dump the (nearly) complete dump of /var/adm/utmpx with "who -a".
    The first entries should look like:

    . system boot Jan 12 01:02
    . run-level 3 Jan 12 01:03 3 0 S
    LOGIN console Jan 12 01:03 0:07 347
    zsmon . Jan 12 01:03 18:15 353

    Otherwise it looks like your utmpx has been corrupted. If you want to have
    your uptime back without reboot, just write the proper utmpx-entry (as root)
    with the pututxline(3C) function.

    You can calculate back the uptime by dividing the number of clock interrupts
    with its rate:
    % vmstat -i
    interrupt total rate
    --------------------------------
    clock 1119508927 1000
    audio810 0 0
    ecppc0 4595 0
    fdc0 1 0
    --------------------------------
    Total 1119513523 1000

    So my system has been rebootet 1119508927/1000 = 12d+22:58 ago.
    Let's check (a few seconds later):
    % uptime
    12:02am up 12 day(s), 22:59, 4 users, load average: 0.02, 0.02, 0.02

    --
    Daniel

  9. Re: Uptime not displaying how long the system has up

    Thanks much I will let you know what I find.


    Daniel Rock wrote:
    > crwilton@gmail.com wrote:
    > > When running Uptme all I get is the following
    > >
    > > 11:11am 1 user, load average: 0.27, 0.37, 0.38
    > >
    > > It does not show how long the system has been up. I am running Solaris
    > > 8.
    > >
    > > Also, "who -b" and "who -r" return nothing.

    >
    > /var/adm/utmpx has been corrupted and was rebuilt.
    >
    > "uptime", "who -b/-r" just read /var/adm/utmpx for the right entry (which
    > have been written by init resp. svc.startd)
    >
    > You can dump the (nearly) complete dump of /var/adm/utmpx with "who -a".
    > The first entries should look like:
    >
    > . system boot Jan 12 01:02
    > . run-level 3 Jan 12 01:03 3 0 S
    > LOGIN console Jan 12 01:03 0:07 347
    > zsmon . Jan 12 01:03 18:15 353
    >
    > Otherwise it looks like your utmpx has been corrupted. If you want to have
    > your uptime back without reboot, just write the proper utmpx-entry (as root)
    > with the pututxline(3C) function.
    >
    > You can calculate back the uptime by dividing the number of clock interrupts
    > with its rate:
    > % vmstat -i
    > interrupt total rate
    > --------------------------------
    > clock 1119508927 1000
    > audio810 0 0
    > ecppc0 4595 0
    > fdc0 1 0
    > --------------------------------
    > Total 1119513523 1000
    >
    > So my system has been rebootet 1119508927/1000 = 12d+22:58 ago.
    > Let's check (a few seconds later):
    > % uptime
    > 12:02am up 12 day(s), 22:59, 4 users, load average: 0.02, 0.02, 0.02
    >
    > --
    > Daniel



  10. Re: Uptime not displaying how long the system has up


    Daniel Rock 写道:

    > crwilton@gmail.com wrote:
    > > When running Uptme all I get is the following
    > >
    > > 11:11am 1 user, load average: 0.27, 0.37, 0.38
    > >
    > > It does not show how long the system has been up. I am running Solaris
    > > 8.
    > >
    > > Also, "who -b" and "who -r" return nothing.

    >
    > /var/adm/utmpx has been corrupted and was rebuilt.
    >
    > "uptime", "who -b/-r" just read /var/adm/utmpx for the right entry (which
    > have been written by init resp. svc.startd)
    >
    > You can dump the (nearly) complete dump of /var/adm/utmpx with "who -a".
    > The first entries should look like:
    >
    > . system boot Jan 12 01:02
    > . run-level 3 Jan 12 01:03 3 0 S
    > LOGIN console Jan 12 01:03 0:07 347
    > zsmon . Jan 12 01:03 18:15 353
    >
    > Otherwise it looks like your utmpx has been corrupted. If you want to have
    > your uptime back without reboot, just write the proper utmpx-entry (as root)
    > with the pututxline(3C) function.
    >
    > You can calculate back the uptime by dividing the number of clock interrupts
    > with its rate:
    > % vmstat -i
    > interrupt total rate
    > --------------------------------
    > clock 1119508927 1000
    > audio810 0 0
    > ecppc0 4595 0
    > fdc0 1 0
    > --------------------------------
    > Total 1119513523 1000
    >
    > So my system has been rebootet 1119508927/1000 = 12d+22:58 ago.
    > Let's check (a few seconds later):
    > % uptime
    > 12:02am up 12 day(s), 22:59, 4 users, load average: 0.02, 0.02, 0.02
    >
    > --
    > Daniel


    Hi Daniel . I have the same problem on solaris 9 machine, but this
    machine run smoothly long time ago , recently this problem came out,
    and I think maybe someone has injected into my machine, and rebuild
    utmpx file eliminate his name from this file.
    Is there anything else I can do to determine whether my systerm is
    safe?
    Thank you very much.


+ Reply to Thread