include defaults for SendMode and ErrorMode; never ignore single dot
[unix-history] / usr / src / old / sysline / sysline.1
CommitLineData
daacd5f0 1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
39d0ae39 2.\" All rights reserved.
412e4f93 3.\"
b2a7c0f3 4.\" %sccs.include.redist.roff%
412e4f93 5.\"
b2a7c0f3 6.\" @(#)sysline.1 6.6 (Berkeley) %G%
39d0ae39 7.\"
b2a7c0f3
CL
8.Dd
9.Dt SYSLINE 1
10.Os BSD 4.2
11.Sh NAME
12.Nm sysline
13.Nd display system status on status line of a terminal
14.Sh SYNOPSIS
15.Nm sysline
16.Op Fl Dbcdehijlmpqrsw
17.Op Fl H Ar remote
18.Op Cm +N
19.Sh DESCRIPTION
20.Nm Sysline
412e4f93
KM
21runs in the background and periodically displays system status information
22on the status line of the terminal.
23Not all terminals contain a status line.
24Those that do include the h19, concept 108, Ann Arbor Ambassador, vt100,
25Televideo 925/950 and Freedom 100.
26If no flags are given,
b2a7c0f3 27.Nm sysline
412e4f93
KM
28displays the time of day, the current load average, the change in load
29average in the last 5 minutes, the number of users (followed by a `u'),
b2a7c0f3
CL
30the number of runnable process (followed by a `r')
31.Bq Tn VAX No only ,
32the number
33of suspended processes (followed by a `s')
34.Bq Tn VAX No only ,
412e4f93
KM
35and the users who have logged on and off since the last status report.
36Finally, if new mail has arrived, a summary of it is printed.
37If there is unread mail in your mailbox, an asterisk will appear after the
38display of the number of users.
39The display is normally in reverse video (if your terminal supports
40this in the status line) and is right justified to reduce distraction.
41Every fifth display is done in normal video to give the screen a chance
42to rest.
b2a7c0f3
CL
43.Pp
44If you have a file named
45.Pa .who
46in your home directory, then the contents
412e4f93
KM
47of that file is printed first. One common use of this
48feature is to alias chdir, pushd, and popd to place the current directory
b2a7c0f3
CL
49stack in
50.Pa ~/.who
51after it changes the new directory.
52.Pp
412e4f93 53The following flags may be given on the command line.
b2a7c0f3
CL
54.Bl -tag -width Ds
55.It Fl D
56Print out the current day/date before the time.
57.It Fl H Ar remote
58Print the load average on the remote host
59.Ar remote
60.Bq Tn VAX No only .
61If the host is down, or is not sending out
62.Xr rwhod
63packets, then
64the down time is printed instead. If the prefix "ucb" is present,
65then it is removed.
66.It Cm +N
67Update the status line every N seconds. The default is 60 seconds.
68.It Fl b
412e4f93
KM
69Beep once every half hour and twice every hour, just like those obnoxious
70watches you keep hearing.
b2a7c0f3 71.It Fl c
412e4f93 72Clear the status line for 5 seconds before each redisplay.
b2a7c0f3 73.It Fl d
570d12e7 74Debug mode -- print status line data in human readable format.
b2a7c0f3 75.It Fl e
412e4f93
KM
76Print out only the information. Do not print out the control commands
77necessary to put the information on the bottom line. This option is
78useful for putting the output of
b2a7c0f3 79.Nm sysline
412e4f93 80onto the mode line of an emacs window.
b2a7c0f3
CL
81.It Fl h
82Print out the host machine's name after the time
83.Bq Tn VAX No only .
84.It Fl i
412e4f93 85Print out the process id of the
b2a7c0f3 86.Nm sysline
412e4f93
KM
87process onto standard output upon startup.
88With this information you can send the alarm signal to the
b2a7c0f3 89.Nm sysline
412e4f93 90process to cause it to update immediately.
b2a7c0f3 91.Nm Sysline
412e4f93
KM
92writes to the standard error, so you can redirect the standard
93output into a file to catch the process id.
b2a7c0f3
CL
94.It Fl j
95Force the sysline output to be left justified even on terminals capable of
96cursor movement on the status line.
97.It Fl l
98Don't print the names of people who log in and out.
99.It Fl m
100Don't check for mail.
101.It Fl p
102Don't report the number of process which are runnable and suspended.
103.It Fl q
104Don't print out diagnostic messages if something goes wrong when starting up.
105.It Fl r
106Don't display in reverse video.
107.It Fl s
412e4f93 108Print "short" form of line by left-justifying
b2a7c0f3 109.Em iff
412e4f93
KM
110escapes are not allowed in the status line.
111Some terminals (the Televideos and Freedom 100 for example)
112do not allow cursor movement (or other "intelligent" operations)
113in the status line. For these terminals,
b2a7c0f3 114.Nm sysline
412e4f93
KM
115normally uses blanks to cause right-justification.
116This flag will disable the adding of the blanks.
b2a7c0f3
CL
117.It Fl w
118Window mode -- print the status on the current line of the terminal,
119suitable for use inside a one line window.
120.El
121.Pp
122If you have a file
123.Pa .syslinelock
124in your home directory, then
125.Nm sysline
412e4f93
KM
126will not update its statistics and write on your screen, it will just go to
127sleep for a minute. This is useful if you want to momentarily disable
b2a7c0f3 128.Nm sysline .
412e4f93
KM
129Note that it may take a few seconds from the time the lock file
130is created until you are guaranteed that
b2a7c0f3 131.Nm sysline
412e4f93 132will not write on the screen.
b2a7c0f3
CL
133.Sh FILES
134.Bl -tag -width /var/spool/rwho/whod.x -compact
135.It Pa /var/run/utmp
136names of people who are logged in
137.It Pa /dev/kmem
138contains process table
139.Bq Tn VAX No only
140.It Pa /var/spool/rwho/whod.*
141who/uptime information for remote hosts
142.Bq Tn VAX No only
143.It Pa ${HOME}/.who
144information to print on bottom line
145.It Pa ${HOME}/.syslinelock
146when it exists, sysline will not print
147.El
148.Sh BUGS
412e4f93
KM
149If you interrupt the display then you may find your cursor missing or
150stuck on the status line. The best thing to do is reset the terminal.
b2a7c0f3 151.Pp
412e4f93 152If there is too much for one line, the excess is thrown away.
b2a7c0f3
CL
153.Sh HISTORY
154The
155.Nm
156command appeared in
157.Bx 4.2 .
158.Sh ENVIRONMENT
159.Bl -tag -width HOME
160.Nm Sysline
161checks for the existence of
162the following environment variables:
163.It Ev HOME
164The directory provided by the
165.Ev HOME
166variable is checked for the file
167.Pa .who .
168.It Ev TERM
169Provides terminal type.
170.It Ev USER
171Provides username.
172.El