procps/uptime.1
David Cantrell 3e7f78d296 Add -p|--pretty option to uptime(1) for pretty output.
This patch adds the -p option to the uptime(1) command, which changes
the uptime displayed from something like:

 10:35:52 up  2:33,  1 user,  load average: 1.69, 1.65, 1.63

to:

 up 2 hours, 33 minutes

I originally implemented this as the up(1) program about 14 years ago.
In 2008 or 2009, I created a patch for procps to add this functionality
to uptime and submitted it to the project.  Never heard from the
project and no new releases of procps had been made.  Then I found out
about this project and decided to port my patch to it.  So here it is.

This is really just for fun.  There is no real technical reason to
have this functionality.  But even now, 14 years later, I still get
emails asking where the source code for up is.  So I thought it would
be nice for the uptime command on Linux to sport the up functionality
by default.
2012-02-22 10:35:12 -05:00

62 lines
1.6 KiB
Groff

.\" -*-Nroff-*-
.\"
.TH UPTIME "1" "June 2011" "procps-ng" "User Commands"
.SH NAME
uptime \- Tell how long the system has been running.
.SH SYNOPSIS
.B uptime
[\fIoptions\fR]
.SH DESCRIPTION
.B uptime
gives a one line display of the following information. The current time, how
long the system has been running, how many users are currently logged on, and
the system load averages for the past 1, 5, and 15 minutes.
.PP
This is the same information contained in the header line displayed by
.BR w (1).
.PP
System load averages is the average number of processes that are either in a
runnable or uninterruptable state. A process in a runnable state is either
using the CPU or waiting to use the CPU. A process in uninterruptable state
is waiting for some I/O access, eg waiting for disk. The averages are taken
over the three time intervals. Load averages are not normalized for the
number of CPUs in a system, so a load average of 1 means a single CPU system
is loaded all the time while on a 4 CPU system it means it was idle 75% of
the time.
.SH OPTIONS
.TP
\fB\-p\fR, \fB\-\-pretty\fR
show uptime in pretty format
.TP
\fB\-h\fR, \fB\-\-help\fR
display this help text
.TP
\fB\-V\fR, \fB\-\-version\fR
display version information and exit
.SH FILES
.TP
.I /var/run/utmp
information about who is currently logged on
.TP
.I /proc
process information
.SH AUTHORS
.B uptime
was written by
.UR greenfie\@gauss.\:rutgers.\:edu
Larry Greenfield
.UE
and
.UR johnsonm\@sunsite.\:unc.\:edu
Michael K. Johnson
.UE
.SH "SEE ALSO"
.BR ps (1),
.BR top (1),
.BR utmp (5),
.BR w (1)
.SH "REPORTING BUGS"
Please send bug reports to
.UR procps\@freelists.org
.UE