SUMMARY: uptime command does not show days

From: <Robert.Barkhymer_at_rcn.net>
Date: Thu Aug 02 2001 - 09:36:57 EDT
Hello managers,

Here is the original question:

While running uptime on our e4500 Sun I get the following printout:
 #   uptime
 11:06am  8 users,  load average: 2.48, 2.90, 2.70

While on our other servers which also have been upgraded to Solaris 8 w=
e
get:
# uptime
 11:07am  up 4 day(s), 23:53,  1 user,  load average: 0.00, 0.00, 0.01

Does anyone know why the amount of days (uptime) does not show?

The answer was that I recently mv and compressed the utmpx/wtmpx files
which uptime depends on. I want to say thanks for the answers I recieve=
d,
Below is a summary of responses:


Kevin Buterbaugh ?
When's the last time your /var/adm/wtmpx file was cleaned out (keep in
mind, that may be done automatically by a cron job)?  Uptime determines=
 how
long the system has been up by reading the last "reboot" entry in the w=
tmpx
file, so if it's been truncated, the uptime command cannot determine ho=
w
long the system has been up.  We try to make it a habit to manually
truncate the wmptx file prior to rebooting our servers so that we keep =
the
wtmpx file from getting too big while maintaining the uptime informatio=
n.
HTH...

Joel Whitmer ?
Sounds like you recycled your utmpx/wtmpx files recently?

Ronald Loftin ?
Either the box rebooted when you weren't looking, or you may have been
hacked.

Eric Shafto ?
Do you have a log rotator that truncates /var/adm/wtmp?

Koos van den Hout ?
It uses the locale to find out how to print the time and days of uptime=
.
Maybe something is wrong with the locale settings/files.

Grant Schoep ?
Not sure, but I am guessing the one machine is getting a different upti=
me.
Do "which uptime" to make sure your not getting some built in shell upt=
ime,
or some ucb uptime, or something like that.

Chris Josephes ?
If I'm not mistaken, the uptime command gets the uptime statistic from =
the
utmpx/wtmpx files.

Mark Hargrave-
Try the full path name: /usr/bin/uptime
You could be hitting another version of "uptime".

Greg Ulyatt-
Is uptime the same? Have you tried the /usr/bin/w command? It should
also give the
uptime. Last reboot should also give you the last reboot. If the proble=
m
persists,
you may want to look into corruption in the /proc filesystem, that's
where most of
this info is kept... other than that, the only thing I can suggest is
that (if) it's
a MP system, perhaps there have been cpu's reset during the uptime?


=
Received on Thu Aug 2 14:36:57 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:25:00 EDT