Notes
Premvet 5 Manual Pages
Cross Updating

Cross Updating Release Notes Doc Center FAQ's Manual

Setting Up Polling

Polling This is where you get the system to talk at regular interval. Normally this is NOT required as most sites have dial in/out modems, however, if one site can only dial-out you may need to setup Polling at this site.

Polling is actually carried out in two stages. A cron job will create a 'phantom' job, then shortly afterwards another cron job will look for work that is to be sent and send it if present.

First you will need to set up the site name and the hours to poll in the file: /usr/lib/uucp/Poll . A sample Poll file is shown below:

# Entries have this format:
# Sitename <tab> hour1 hour2 hour3 ...
# Lines that begin with a # are ignored.

# Note that a <tab> MUST follow the site name:
# this file is read by shell script uudemon.poll.

bdsedin 		2  6  10
#microso		0 2 4 6 8 10 12 14 16 18 20 22

This file is processed by /usr/lib/uucp/uudemon.poll. When uudemon.poll is run it will check to see if the current hour is contained in the Poll file and if so generate a 'phantom' job. The uudemon.hour script will look for any work (including poll jobs). If there is anything it will attempt to send it to the appropriate site. To set up polling you need to ensure the following lines are configured in cron for uucp:

10 * * * * /usr/lib/uucp/uudemon.poll > /dev/null
20 * * * * /usr/lib/uucp/uudemon.hour > /dev/null 

Note: You adjust the times to suit your needs.

If we implement polling for the overnight transfer, we may have two phone calls:

This can be circumvented by scheduling the times so the x_send is run just after the phantom job is created. If there is work, x_send will call, transfer the information (including the phantom jobs), this means the poll will not take place. If there is no work the machine will poll transferring the information. With this in mind let's look again at the overnight transfer:

SiteTimeActivity
MAIN2.15x_send - Queue the work but don't phone.
BRANCH2.30 x_send - Send the work AND collect it.
BRANCH 2.33POLL - If x_send worked the poll will be canceled.

The cron settings in this situation would be:

Main

15 2 * *	0-6	/usr/utilities/x_send
30 * * * 0-6 /usr/utilities/x_check

Branch

Root's Cron Jobs

21 2 * * 0-6 /usr/utilities/x_send
45 * * * 0-6 /usr/utilities/x_check
UUCP's Cron Jobs

33 * * * * /usr/lib/uucp/uudemon.hour > /dev/null 
20 * * * * /usr/lib/uucp/uudemon.poll > /dev/null

The 'Poll' file on the Branch machine:

main 2


Previous T.O.C. Next