*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> dtsdate (1m)              


 dtsdate(1m)              Open Software Foundation               dtsdate(1m)

 NAME    [Toc]    [Back]
      dtsdate - Sets local clock from a remote dtsd server host

 SYNOPSIS    [Toc]    [Back]
      dtsdate [-q] [-s] [-u] remote_host [nsecs]

 ARGUMENTS    [Toc]    [Back]
      -q        Queries the difference in time between the local host and
                the remote host, but does not change the local clock.  The
                returned result (2 if the time would have been reset, 1 if
                there was an error, and 0 otherwise) can be used by a script
                to determine what action to take.

      -s        Causes dtsdate to work silently, without showing the time.

      -u        Shows the time in UTC, rather than in the current time zone.

                The name or the IP address of a remote host that has a dtsd

      nsecs     An integer giving the number of seconds by which the remote
                and local host times can differ, without the local host's
                clock being reset.  If nsecs is 0, or if it is not
                specified, it is treated as if it were extremely large, and
                no resetting occurs.

 DESCRIPTION    [Toc]    [Back]
      The dtsdate command sets the local clock of a system to be the same as
      the host remote_host, running a dtsd server.  The purpose of dtsdate
      is to ensure that clock skew is minimized at initial cell
      configuration or at host instantiation, because it is difficult to
      start DCE and its components if the skew is too great.

      Clocks among all DCE components must be within five minutes of each
      other, to prevent failure of CDS and of security.  Some DCE components
      have even more stringent requirements.  For instance, a DFS file
      server cannot start if its local host differs from other DFS hosts by
      more than ten seconds.

      The dtsdate command can be used for adjusting a clock backwards,
      before DCE is running on a host.  Adjusting a clock backwards while
      DCE is running can cause many difficulties, because security and file
      system software generally require system time to increase

 NOTES    [Toc]    [Back]
      The remote host must be running as a DTS server.  This means that the
      dtsd on that system must have registered the DTS management interface,

 Hewlett-Packard Company            - 1 OSF DCE 1.1/HP DCE 1.8 PHSS_26394-96

 dtsdate(1m)              Open Software Foundation               dtsdate(1m)

      because dtsdate uses the management call to get the current time from
      that host.

      For dtsdate to be able to set the clock, it must run as a privileged
      user (root).

 EXIT VALUE    [Toc]    [Back]
      If the -q argument is given, dtsdate returns 2 if the remote time and
      local time differ by more than nsecs, 1 if there was an error, and 0

      If the -q argument is not given, dtsdate returns 1 if there was an
      error, and 0 otherwise.

 EXAMPLES    [Toc]    [Back]
      With only the host argument:

        dtsdate remotehost

      dtsdate prints out the time on the remote host.

      In this example:

        dtsdate -s -q remotehost 10

      dtsdate does not print out the remote host's time.  If the times
      differ by more than 10 seconds, it returns the value of 1, otherwise

      In the next example:

        dtsdate -s remotehost 10

      dtsdate sets the clock if it differed from the remote clock by more
      than 10 seconds.  It does this work silently, because of the -s

      The following example shows a shell script that uses the return value
      of dtsdate:

        dtsdate -s -q remhost 10
        result = $?
        if [ $result -eq 0 ] ; then
            echo "Time is within tolerence."
        elif [ $result -eq 1 ] ; then
            echo "Could not contact remote host." >&2
        else                              # result = 2
          if dtsdate remhost 10; then     # it failed!
              echo "Could not set the clock." >&2

 Hewlett-Packard Company            - 2 OSF DCE 1.1/HP DCE 1.8 PHSS_26394-96

 dtsdate(1m)              Open Software Foundation               dtsdate(1m)


      Commands: dtsd (1m)

 Hewlett-Packard Company            - 3 -OSF DCE 1.1/HP DCE 1.8 PHSS_26394-96
[ Back ]
 Similar pages
Name OS Title
dcecp_clock HP-UX A dcecp object that manages the clock on a local or remote host
ypxfr FreeBSD transfer NIS database from remote server to local host
ypxfr Linux transfer NIS database from remote server to local host
rcp Tru64 Copies files on the same host, between a local host and a remote host, and between two remote hosts
hostid Tru64 Sets or displays the identifier of the local host
ftp Tru64 Transfers files between a local and a remote host
tt_host_file_netfile HP-UX map between local and canonical pathnames on a remote host
tt_host_netfile_file HP-UX map between canonical and local pathnames on a remote host
dxhosts Tru64 Provides host management capabilities for local and remote hosts
ypxfr Tru64 Transfer a Network Information Service (NIS) map from a NIS server to the local host
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service