DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T d

⟦80659ee0f⟧ TextFile

    Length: 10112 (0x2780)
    Types: TextFile
    Names: »downtime.8«

Derivation

└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
    └─⟦653021b30⟧ »EurOpenD3/utils/downtime.tar.Z« 
        └─⟦946c717da⟧ 
            └─⟦this⟧ »downtime.8« 

TextFile

.\"
.\" Copyright (c) 1988 Michael A. Cooper, University of Southern California.
.\" This program may be used, copied, modified, and redistributed freely
.\" for noncommercial purposes, so long as this notice remains intact.
.\"
.\" $Header: downtime.8,v 4.2 88/07/05 16:06:06 mcooper Exp $
.\" 
.TH DOWNTIME 8 "April 20, 1988"
.ds ]W USC-UCS
.SH NAME
downtime \- Schedule and perform system downtimes.
.SH SYNOPSIS
downtime
[
.B \-q
] [
.B \-F
]
.B command
[
\fBarguments\fP
]
.br
.sp
downtime
.B \-u
.SH DESCRIPTION
.I DownTime
performs scheduling of system downtimes, provides advance warning
to users, and shuts down UNIX.
All commands may be performed via command line arguments or
during an interactive downtime session.
.PP
Once a downtime is scheduled with 
.I DownTime's
.B shutdown
command, an entry is made in a master database file containing all scheduled
downtimes 
for the local machine.  
In this way, you may schedule a downtime well in advance.
If the newly added downtime is within the next 8 hours,
a downtime process is forked
to warn users and perform the actually shutdown of UNIX at the requested
time.
If the downtime is not within 8 hours, no process is spawned.
.I DownTime 
should be run with the 
.I check
command
(i.e. \fIdowntime check\fP)
once an hour from
.I cron(8)
to check for upcoming
system downtimes.
(See 
.I check
in the 
.B COMMANDS
section for details.)
.PP
When a downtime is within 2 weeks, a message describing
the downtime is added to the message of the day file 
(\fI/etc/motd\fP).
Starting at about 8 hours before a downtime, users are warned
periodically of the upcoming shut down.
All users logged into the local system are notified with an appropriate
message describing the downtime.
If the local machine has any NFS clients, a remote broadcast message is
sent to each machine that has one or more of the local machine's filesystems
mounted via NFS (see 
\fIshowmount(8)\fP).
(Remote broadcast messages can be turned off on a per downtime basis with the
\fI``\-NoRemote''\fP
option of the
.I shutdown
command.)
When the downtime is less than 5 minutes away, new login's
are turned off by creating the file 
.I /etc/nologin
containing an appropriate message that is displayed by 
.I login(1).
When UNIX is shut down, all logged in users are given a final
message, the
.I nologin
file
is removed, the downtime message in the 
message of the day file
(\fI/etc/motd\fP)
is deleted,
an entry is made in the system shutdown log file
(\fI/usr/adm/shutdownlog\fP), and
the system is placed in single user mode (or rebooted or halted).
.SH "CONFIGURATION FILE"
The file
.I /etc/downtime.cf
contains information pertaining to granting user's access and
changing certain parameters of
.I DownTime.
Lines starting with ``#'' or empty lines, are ignored.
The following is a list of possible keywords and their arguments:
.IP "user \fIuser-name\fR"
This will allow 
.I user-name
access to run
.I DownTime.
This is in place to allow 
.I DownTime
to be run set-uid root.
By default, only the super-user may run downtime.
.IP "group \fIgroup-name\fR"
This will allow all members of
.I group-name
access to run 
.I DownTime.
.IP "warntime \fBN\fIscale\fR"
This keyword tells 
.I DownTime
when it should start warning all logged in users about an upcoming
downtime.
The
.I scale
is used to set the value
.B N
in time.  Valid scales include, ``s'', ``m'', ``h'', and ``d'';
seconds, minutes, hours, and days, respectively.
To set a time of 6 hours, you would specify ``6h''.
The default 
.I scale 
is hours. 
The default 
.I warntime 
is 8 hours. 
.IP "motdtime \fBN\fIscale\fR"
This keyword can be used to specify when a message should be placed
in the message of the day file
.I /etc/motd.
The syntax is the same as for
.I warntime.
The default motd time is 2 weeks.
.IP "motdfile \fIfile\fR"
The message of the day file is
.I file.
.IP "datafile \fIfile\fR"
The data file
to use for
.I DownTime
entries should be
.I file.
.IP "helpfile \fIfile\fR"
The help file is
.I file.
.SH OPTIONS
The following are options that may be used on the command line.
.IP \-u
.I DownTime
should be called with this option
at boot time (from  
\fI/etc/rc.local\fP)
to unlock all downtime entries.
A 
.I check
command is also run to check for upcoming downtimes and to remove
any old entries.
This is necessary incase the machine crashed while a downtime
process was locked.
.IP \-F
Set 
.I force
mode.  When 
.I force
is set, the user is not asked questions when adding/deleting
downtime entries.
.IP \-q
Set
.I quiet
mode.
Makes various commands quiet about what they are doing.
.SH COMMANDS
Most of these commands can be used both on the command line
and during an interactive session.  When no commands are supplied
on the command line, 
.I DownTime
starts up in interactive mode.
.IP "shutdown \fB[\fI options \fB] \fIdown-time up-time [\fI shutdown message \fB]\fR"
.RS
.LP
The shutdown command is used to add a downtime entry to the downtime
database file.
.in +.5
.LP
.I options
is one or more of the following:
.sp
.RS
.B "[ \-Kill | \-Halt | \-Reboot | \-Fake ]"
.RS
One of the above may be specified to indicate what action
should be taken upon bringing UNIX down.  
.B ``\-Kill''
is the
default and merely puts UNIX into single-user mode.  
.B ``\-Halt''
halt's the system.  
.B ``\-Reboot''
reboots UNIX.  
.B ``\-Fake''
merely
`fakes' a shutdown, but does not actually bring UNIX down.
.sp
.RE
.B "[ \-Fastboot | \-NoSync ] "
.RS
If
.B ``\-Fastboot''
is specified,
then a 
.I fastboot(8)
is done at reboot time.
If 
.B ``\-NoSync''
is specified,
then no final
.I sync(8)
is performed.
.sp
.RE
.B "[ \-Motd | \-NoMotd ]"
.RS
If 
.B ``\-Motd''
is enabled (the default), a message concerning the downtime
is put into /etc/motd.
The
.B ``\-NoMotd''
disables this.
.sp
.RE
.B "[ \-RemoteMessages | \-NoRemoteMessages ]"
.RS
.SM
[ The \fBRemoteMessages\fP options are for use only on systems which support
RPC. ]
.LG
.sp
If 
.B ``\-RemoteMessages'' 
is specified
(the default), a remote broadcast
message is sent to all users on each NFS machine that
has any filesystems from the local machine mounted.
The
.B ``\-NoRemoteMessages''
option disables this.
.sp
.RE
.B "[ \-LocalMessages | \-NoLocalMessages ]"
.RS
The
.B ``\-LocalMessages''
option enables sending warning messages to locally logged in users
regarding the downtime.
This is the default.
The 
.B ``\-NoLocalMessages''
option disables this.
.sp
.RE
.B "[ \-NoMessages ]"
.RS
Do not send any messages to users.  This is the equivilant of using
both 
.B ``\-NoLocalMessages''
and
.B ``\-NoRemoteMessages''.
.sp
.RE
.B "[ \-ShortMessages | \-VerboseMessages ]"
.RS
If
.B ``\-ShortMessages''
is used (the default), warnings send to users will be
short, one line messages.
Specifying
.B ``\-VerboseMessages''
will enable verbose messages to users.
.RE
.RE
.LP
.I down-time
and
.I up-time
should be in one of the following forms:
.sp
.RS
.B "HH:MM [ MM/DD [ /YY ] ]"
.RS
where 
.B HH
is an hour (24 hour clock) and 
.B MM
are minutes.
You may optionally supply a date (today's date is the default)
consisting of a month 
(\fBMM\fR), a day of the month (\fBDD\fR), and
an optional year (\fBYY\fR) (the current year is the default).
.sp
.RE
.B +MINUTES
.RS
The down-time and/or up-time will occur 
.B MINUTES 
in the future
relitive to the current time.
.sp
.RE
.B now
.RS
The word 
.B ``now'' 
can be specified only for the 
.I down-time
to indicate the system should be taken down immediately.
.sp
.RE
.RE
.LP	
The optional 
.I "shutdown message"
should be a short description of why the
system is going down.  No quotes are needed.
.RE
.IP \fBcheck\fP
The 
.I check 
command checks for up coming downtimes.
A message is added to the message of the day (\fI/etc/motd\fP) 
for each
downtime
scheduled for within the next 2 weeks (if one has not already been added
for that entry).
This message is removed during the shutdown procedure.
If there are any
downtime's scheduled for within the next 8 hours,
then a 
.I DownTime 
process is spawned (via 
\fIfork(2)\fP)
to handle that particular downtime entry.
.IP "delete \fBENTRY\fP"
The 
.I delete 
command deletes a downtime entry that has
already been entered into the downtime database file.
The 
.I ENTRY
is the entry number shown by the
.I list
command or shown by a ``?'' during an
interactive session.
.IP "help \fB[ command ]\fP"
The help command is used to print out information
concerning most DownTime commands.  
By default,
.I help
displays information on the 
.I help
command itself.
Typing a ``?'' as an argument to
.I help
during an interactive session will produce a list of subjects on
which help is available for.
.IP \fBlist\fP
The 
.I list 
command lists all scheduled downtime's entered
in the 
.I DownTime 
database file.
.IP \fBquit\fP
The quit command, exits from 
.I DownTime's
interactive mode.
.IP "set [ \fBVARIABLE\fP true | false | \fInumeric\fP ]"
The 
.I "set" 
command is used to set certain internal
variables to boolean ``true'' or ``false'' or to
the numeric value
.I numeric.
When no arguments are supplied, the known list of 
variables and their current values are displayed.  
.SH AUTHOR
Michael A. Cooper,
.br
University Computing Services,
.br
University of Southern California.
.SH FILES
.ta \w'/usr/public/etc/downtime.hf\ \ \ 'u
/fastboot	- File to indicate fastboot(8)
.br
/etc/nologin	- Disable new logins
.br
/etc/downtime.df	- DownTime Data File
.br
/etc/downtime.cf	- DownTime Configuration File
.br
/usr/public/etc/downtime.hf	- DownTime Help File
.br
/etc/dt_tmp*	- Temporary DownTime file
.br
/etc/motd	- Message of the day
.br
/usr/adm/shutdownlog	- Shutdown log messages
.br
/usr/adm/downtime.log	- DownTime log file
.br
.SH SEE ALSO
login(1), fork(2), cron(8), halt(8), fastboot(8),
showmount(8), shutdown(8), reboot(8)
.SH DIAGNOSTICS
Many, most of which are self explainatory.
.SH BUGS
.I DownTime 
conflicts such as over lapping downtimes, and
downtimes
scheduled to start while the system is scheduled to be down,
are not dealt with.  It is left up to the system
administrator to assure that there are no downtime conflicts.