source: trunk/athena/etc/desync/desync.8 @ 9726

Revision 9726, 2.6 KB checked in by ghudson, 28 years ago (diff)
Rename desync.man to desync.8, edit a bit, and describe the new -t feature.
Line 
1.\" $Id: desync.8,v 1.1 1997-03-14 21:20:24 ghudson Exp $
2.\"
3.\" Copyright 1995, 1996, 1997 by the Massachusetts Institute of Technology.
4.\"
5.\" Permission to use, copy, modify, and distribute this
6.\" software and its documentation for any purpose and without
7.\" fee is hereby granted, provided that the above copyright
8.\" notice appear in all copies and that both that copyright
9.\" notice and this permission notice appear in supporting
10.\" documentation, and that the name of M.I.T. not be used in
11.\" advertising or publicity pertaining to distribution of the
12.\" software without specific, written prior permission.
13.\" M.I.T. makes no representations about the suitability of
14.\" this software for any purpose.  It is provided "as is"
15.\" without express or implied warranty.
16.\"
17.TH DESYNC 1 "5 March 1997"
18.SH NAME
19desync \- desynchronize timed jobs on networks
20.SH SYNOPSIS
21.B desync
22[
23.B \-t
24timefile ] [ range ]
25.SH DESCRIPTION
26.I desync
27is a tool which sleeps a random (ip-address seeded) period of time (up
28to an hour, by default) in order to skew the network load from several
29machines running
30.I cron
31jobs that would otherwise be synchronized.
32
33An invocation would appear something like
34
35.nf
36     42 * * * *          desync; /usr/lib/sendmail -q
37.fi
38
39in a crontab file.
40.SH OPTIONS
41.TP 8
42.B range
43This optional range specifies, in seconds, the maximum value for the
44randomly selected sleep time.  The default value is 3600.
45.TP 8
46.B \-t timefile
47This option changes the behavior of
48.I desync
49to make it useful for desynchronizing jobs when sleeping is not
50appropriate.  If
51.I timefile
52does not exist,
53.I desync
54selects a random sleep time using the normal method, adds it to the
55current time value, writes the result into
56.IR timefile ,
57and exits with status 1.  If
58.I timefile
59does exist and the current time is less than the time value listed in
60.IR timefile ,
61then
62.I desync
63takes no action and exits with status 1.  If
64.I timefile
65exists and the current time is equal to or greater than the time value
66listed in
67.IR timefile ,
68then
69.I desync
70unlinks
71.I timefile
72and exits with status 0.  This feature can be used in shell code of
73the following form:
74
75.nf
76        if desync -t /tmp/mytimefile 3600; then
77                echo "Starting the job."
78        else
79                echo "Putting it off until later."
80        fi
81.fi
82
83.SH DIAGNOSTICS
84If
85.I desync
86fails to acquire the machine's IP address from
87.IR rc.conf ,
88it returns an exit status of 2 and does not sleep.
89.SH FILES
90.TP 25
91.B /etc/athena/rc.conf
92Athena startup configuration file
93.SH SEE ALSO
94cron(1)
95.SH AUTHOR
96Craig Fields, MIT Information Systems
97.br
98Greg Hudson, MIT Information Systems
99.br
100Copyright (c) 1995, 1996, 1997, Massachusetts Institute of Technology
Note: See TracBrowser for help on using the repository browser.