timed Daemon

Purpose

Invokes the time server daemon.

Syntax

/usr/sbin/timed-c ] [  -M ] [  -t ] [ [  -n Network ] ... | [  -i Network ] ... ]

Note: Use the rc.tcpip file to start the daemon with each initial program load. You can specify the timed daemon at the command line. You can also use SRC commands to control the timed daemon from the command line.

Description

The timed daemon synchronizes one machine's clock with those of other machines on the local area network that are also running the timed daemon. The timed daemon slows the clocks of some machines and speeds up the clocks on other machines to create an average network time.

When the timed daemon is started without the -M flag, the machine locates the nearest master time server and asks for the network time. Then the machine uses the date command to set the machine's clock to the network time. The machine accepts synchronization messages periodically sent by the master time server and calls the adjtime subroutine to perform the needed corrections on the machine's clock.

When the timed daemon is started with the -M flag, the machine polls each of its local area networks to determine which networks have master time servers. The machine becomes a master time server on the networks that do not have a master time server. The machine becomes a submaster time server on the networks that already have a master time server. The timed daemon creates the /var/adm/timed.masterlog file when the timed daemon is started with the -M flag. The /var/adm/timed.masterlog file contains a log of the deltas between the local machine's clock and the clocks of the other machines on the networks for which the local machine is the master time server. The /var/adm/timed.masterlog file is updated approximately every 4 minutes and is never cleared. You may need to clear this file to conserve disk space. If the machine is only a submaster time server on its networks, the /var/adm/timed.masterlog file remains empty. To clear the /var/adm/timed.masterlog file, enter:

cat /dev/null > /var/adm/timed.masterlog 

If the master time server ceases to function on a network, a new master time server is elected from the submaster time servers on that network. The timedc command enables you to select which submaster time server becomes the master time server.

The timed daemon can be controlled using the System Resource Controller (SRC), the System Management Interface Tool (SMIT), or the command line. The timed daemon is not started by default. Use the rc.tcpip file to start the timed daemon with each initial program load.

Manipulating the timed Daemon with the System Resource Controller

The timed daemon is a subsystem controlled by the SRC. The timed daemon is a member of the SRC tcpip system group. Use the following SRC commands to manipulate the timed daemon:

Item Description
startsrc Starts a subsystem, group of subsystems, or a subserver.
stopsrc Stops a subsystem, group of subsystems, or a subserver.
lssrc Gets the short status of a subsystem, group of subsystems, or a subserver. The long status option usually found in lssrc is not supported for the timed daemon.

Flags

Item Description
-c Specifies that the master-timed daemon should ignore the time values it gets from the other slave-timed daemons when for calculating the average network time. This flag changes the network time to be the same as the system clock on the master-timed daemon.
-i Network Specifies a network to be excluded from clock synchronization. The Network variable can be either a network address or a network name. If a network name is specified for the Network variable, the network name must be defined in the /etc/networks file. Specify one network address or network name with each -i flag. Do not use this flag with the -n flag.
-M Specifies the machine is a master or submaster time server on its local area networks. If a master time server is not currently available on a network, the machine becomes the master time server for that network. If a master time server already exists on a network, the machine becomes a submaster time server on that network. However, the machine can become the master time server if the current master time server becomes inoperative. The timed daemon creates the /var/adm/timed.masterlog file when the timed daemon is started with the -M flag.
-n Network Specifies a network to include in clock synchronization. The Network variable can be either a network address or a network name. If a network name is specified for the Network variable, the network name must be defined in the /etc/networks file. Specify one network address or network name with each -n flag. Do not use this flag with the -i flag.
-t Allows the timed daemon to trace the messages it receives and store them in the /var/adm/timed.log file. You can also use the timedc command to activate tracing.

Examples

  1. To start the timed daemon with SRC control, enter:
    startsrc -s timed
    This command starts the daemon. You can use this command in the rc.tcpip file or on the command line. The -s flag specifies that the subsystem that follows is to be started.
  2. To stop the timed daemon normally with SRC control, enter:
    stopsrc -s timed
    This command stops the daemon. The -s flag specifies that the subsystem that follows is to be stopped.
  3. To get a short status report from the timed daemon, enter:
    lssrc -s timed
    This command returns the name of the daemon, the process ID of the daemon, and the state of the daemon (active or inactive).
  4. To start the timed daemon with SRC control as the master or submaster time server and to exclude networks net1 and net2 from clock synchronization, enter:
    startsrc -s timed -a "-M -i net1 -i net2"
    This command starts the daemon. The machine becomes the master or submaster time server for its networks. Networks net1 and net2 are excluded from clock synchronization. The -s flag specifies that the subsystem that follows is to be started. The -a flag specifies that the timed daemon should be started with the flags that follow. The flags must be enclosed in quotes.
  5. To start the timed daemon, activate tracing, and include net1 and net2 in clock synchronization, enter:
    timed -t -n net1 -n net2
    This command starts the daemon. Tracing is activated and both net1 and net2 are included in clock synchronization.

Files

Item Description
/var/adm/timed.log Contains the messages traced for the timed daemon. This file is created when the timed daemon is started with the -t flag or when tracing is enabled with the timedc command.
/etc/rc.tcpip Contains the SRC commands to be executed at system startup.
/var/adm/timed.masterlog Contains a log of the deltas between the master time server clock and the clocks of the other machines on the networks. This file is created when the timed daemon is started with the -M flag. However, this file only contains information for those networks on which the machine is the master time server.