143743Scael.\" Copyright (c) 1983, 1990 The Regents of the University of California. 235726Sbostic.\" All rights reserved. 319777Smckusick.\" 4*48623Scael.\" %sccs.include.redist.roff% 519777Smckusick.\" 6*48623Scael.\" @(#)sysline.1 6.6 (Berkeley) 04/24/91 735726Sbostic.\" 8*48623Scael.Dd 9*48623Scael.Dt SYSLINE 1 10*48623Scael.Os BSD 4.2 11*48623Scael.Sh NAME 12*48623Scael.Nm sysline 13*48623Scael.Nd display system status on status line of a terminal 14*48623Scael.Sh SYNOPSIS 15*48623Scael.Nm sysline 16*48623Scael.Op Fl Dbcdehijlmpqrsw 17*48623Scael.Op Fl H Ar remote 18*48623Scael.Op Cm +N 19*48623Scael.Sh DESCRIPTION 20*48623Scael.Nm Sysline 2119777Smckusickruns in the background and periodically displays system status information 2219777Smckusickon the status line of the terminal. 2319777SmckusickNot all terminals contain a status line. 2419777SmckusickThose that do include the h19, concept 108, Ann Arbor Ambassador, vt100, 2519777SmckusickTelevideo 925/950 and Freedom 100. 2619777SmckusickIf no flags are given, 27*48623Scael.Nm sysline 2819777Smckusickdisplays the time of day, the current load average, the change in load 2919777Smckusickaverage in the last 5 minutes, the number of users (followed by a `u'), 30*48623Scaelthe number of runnable process (followed by a `r') 31*48623Scael.Bq Tn VAX No only , 32*48623Scaelthe number 33*48623Scaelof suspended processes (followed by a `s') 34*48623Scael.Bq Tn VAX No only , 3519777Smckusickand the users who have logged on and off since the last status report. 3619777SmckusickFinally, if new mail has arrived, a summary of it is printed. 3719777SmckusickIf there is unread mail in your mailbox, an asterisk will appear after the 3819777Smckusickdisplay of the number of users. 3919777SmckusickThe display is normally in reverse video (if your terminal supports 4019777Smckusickthis in the status line) and is right justified to reduce distraction. 4119777SmckusickEvery fifth display is done in normal video to give the screen a chance 4219777Smckusickto rest. 43*48623Scael.Pp 44*48623ScaelIf you have a file named 45*48623Scael.Pa .who 46*48623Scaelin your home directory, then the contents 4719777Smckusickof that file is printed first. One common use of this 4819777Smckusickfeature is to alias chdir, pushd, and popd to place the current directory 49*48623Scaelstack in 50*48623Scael.Pa ~/.who 51*48623Scaelafter it changes the new directory. 52*48623Scael.Pp 5319777SmckusickThe following flags may be given on the command line. 54*48623Scael.Bl -tag -width Ds 55*48623Scael.It Fl D 56*48623ScaelPrint out the current day/date before the time. 57*48623Scael.It Fl H Ar remote 58*48623ScaelPrint the load average on the remote host 59*48623Scael.Ar remote 60*48623Scael.Bq Tn VAX No only . 61*48623ScaelIf the host is down, or is not sending out 62*48623Scael.Xr rwhod 63*48623Scaelpackets, then 64*48623Scaelthe down time is printed instead. If the prefix "ucb" is present, 65*48623Scaelthen it is removed. 66*48623Scael.It Cm +N 67*48623ScaelUpdate the status line every N seconds. The default is 60 seconds. 68*48623Scael.It Fl b 6919777SmckusickBeep once every half hour and twice every hour, just like those obnoxious 7019777Smckusickwatches you keep hearing. 71*48623Scael.It Fl c 7219777SmckusickClear the status line for 5 seconds before each redisplay. 73*48623Scael.It Fl d 7427993SanneDebug mode -- print status line data in human readable format. 75*48623Scael.It Fl e 7619777SmckusickPrint out only the information. Do not print out the control commands 7719777Smckusicknecessary to put the information on the bottom line. This option is 7819777Smckusickuseful for putting the output of 79*48623Scael.Nm sysline 8019777Smckusickonto the mode line of an emacs window. 81*48623Scael.It Fl h 82*48623ScaelPrint out the host machine's name after the time 83*48623Scael.Bq Tn VAX No only . 84*48623Scael.It Fl i 8519777SmckusickPrint out the process id of the 86*48623Scael.Nm sysline 8719777Smckusickprocess onto standard output upon startup. 8819777SmckusickWith this information you can send the alarm signal to the 89*48623Scael.Nm sysline 9019777Smckusickprocess to cause it to update immediately. 91*48623Scael.Nm Sysline 9219777Smckusickwrites to the standard error, so you can redirect the standard 9319777Smckusickoutput into a file to catch the process id. 94*48623Scael.It Fl j 95*48623ScaelForce the sysline output to be left justified even on terminals capable of 96*48623Scaelcursor movement on the status line. 97*48623Scael.It Fl l 98*48623ScaelDon't print the names of people who log in and out. 99*48623Scael.It Fl m 100*48623ScaelDon't check for mail. 101*48623Scael.It Fl p 102*48623ScaelDon't report the number of process which are runnable and suspended. 103*48623Scael.It Fl q 104*48623ScaelDon't print out diagnostic messages if something goes wrong when starting up. 105*48623Scael.It Fl r 106*48623ScaelDon't display in reverse video. 107*48623Scael.It Fl s 10819777SmckusickPrint "short" form of line by left-justifying 109*48623Scael.Em iff 11019777Smckusickescapes are not allowed in the status line. 11119777SmckusickSome terminals (the Televideos and Freedom 100 for example) 11219777Smckusickdo not allow cursor movement (or other "intelligent" operations) 11319777Smckusickin the status line. For these terminals, 114*48623Scael.Nm sysline 11519777Smckusicknormally uses blanks to cause right-justification. 11619777SmckusickThis flag will disable the adding of the blanks. 117*48623Scael.It Fl w 118*48623ScaelWindow mode -- print the status on the current line of the terminal, 119*48623Scaelsuitable for use inside a one line window. 120*48623Scael.El 121*48623Scael.Pp 122*48623ScaelIf you have a file 123*48623Scael.Pa .syslinelock 124*48623Scaelin your home directory, then 125*48623Scael.Nm sysline 12619777Smckusickwill not update its statistics and write on your screen, it will just go to 12719777Smckusicksleep for a minute. This is useful if you want to momentarily disable 128*48623Scael.Nm sysline . 12919777SmckusickNote that it may take a few seconds from the time the lock file 13019777Smckusickis created until you are guaranteed that 131*48623Scael.Nm sysline 13219777Smckusickwill not write on the screen. 133*48623Scael.Sh FILES 134*48623Scael.Bl -tag -width /var/spool/rwho/whod.x -compact 135*48623Scael.It Pa /var/run/utmp 136*48623Scaelnames of people who are logged in 137*48623Scael.It Pa /dev/kmem 138*48623Scaelcontains process table 139*48623Scael.Bq Tn VAX No only 140*48623Scael.It Pa /var/spool/rwho/whod.* 141*48623Scaelwho/uptime information for remote hosts 142*48623Scael.Bq Tn VAX No only 143*48623Scael.It Pa ${HOME}/.who 144*48623Scaelinformation to print on bottom line 145*48623Scael.It Pa ${HOME}/.syslinelock 146*48623Scaelwhen it exists, sysline will not print 147*48623Scael.El 148*48623Scael.Sh BUGS 14919777SmckusickIf you interrupt the display then you may find your cursor missing or 15019777Smckusickstuck on the status line. The best thing to do is reset the terminal. 151*48623Scael.Pp 15219777SmckusickIf there is too much for one line, the excess is thrown away. 153*48623Scael.Sh HISTORY 154*48623ScaelThe 155*48623Scael.Nm 156*48623Scaelcommand appeared in 157*48623Scael.Bx 4.2 . 158*48623Scael.Sh ENVIRONMENT 159*48623Scael.Bl -tag -width HOME 160*48623Scael.Nm Sysline 161*48623Scaelchecks for the existence of 162*48623Scaelthe following environment variables: 163*48623Scael.It Ev HOME 164*48623ScaelThe directory provided by the 165*48623Scael.Ev HOME 166*48623Scaelvariable is checked for the file 167*48623Scael.Pa .who . 168*48623Scael.It Ev TERM 169*48623ScaelProvides terminal type. 170*48623Scael.It Ev USER 171*48623ScaelProvides username. 172*48623Scael.El 173