Project

General

Profile

Bug #13311

uptime(1) dazed and confused for a minute after boot

Added by Joshua M. Clulow 16 days ago. Updated 16 days ago.

Status:
New
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

If uptime is invoked early in the boot process, it prints a message which is not quite right:

$ uptime
23:07:43    up  1 user,  load average: 0.30, 0.08, 0.03

Critically, the uptime is entirely absent -- it should be present between "up" and "1 user". Once at least a whole minute has passed, the output is correctly rendered.


Files

uptime (22.1 KB) uptime fixed uptime binary run as root for now Rick V, 2020-11-14 05:57 AM
#1

Updated by Joshua M. Clulow 16 days ago

#2

Updated by Rick V 16 days ago

  • Assignee set to Rick V
#3

Updated by Electric Monk 16 days ago

  • Gerrit CR set to 1061
#4

Updated by Rick V 16 days ago

i mean unless w(1M) started counting seconds all of a sudden...

#5

Updated by Rick V 16 days ago

  • File uptime added
#6

Updated by Rick V 16 days ago

here is the copy of uptime(1M) from my last patch and its output on a freshly booted server:

old output for ref:

#7

Updated by Rick V 16 days ago

  • File deleted (uptime)
#8

Updated by Rick V 16 days ago

which then correctly prints out

[despair@sun-pc /data2/illumos-gate]$ sudo ./uptime
00:00:02    up 11 hr(s),  1 user,  load average: 0.21, 0.25, 0.21

(A full nightly would build a w(1M) that can be run by normal user. Sorry.)

Also available in: Atom PDF