4578879 [rkeene@sledge /home/rkeene/devel/htp/mirror]$ cat htpdate-man.html
Man page of HTPDATE

HTPDATE


version 0.8.8

NAME

htpdate - Time synchronization (daemon)

SYNOPSIS

htpdate [-146adhlqstD] [-i pid file] [-m minpoll] [-M maxpoll] [-p precision] [-P <proxyserver>[:port]] <host[:port]> ...

DESCRIPTION

The HTTP Time Protocol (HTP) is used to synchronize a computer's time with web servers as reference time source. Htp will synchronize your computer's time to Greenwich Mean Time (GMT) via HTTP headers from web servers. The htpdate package includes a program for retrieving the date and time from remote machines via a network. Htpdate works through proxy servers. Accuracy of htpdate will be usually within 0.5 seconds (better with multiple servers). If this is not good enough for you, try the ntpd package.

OPTIONS

-0
HTTP/1.0 request (default is HTTP/1.1).
-4
Force IPv4 name resolution only. Default behaviour is to try IPv6 first and fall back to IPv4.
-6
Force IPv6 name resolution only.
-a
Adjust time smoothly (default in daemon mode).
-d
Turn debug on. Shows the "raw" timestamp, round trip time, time delta and and basic statistics of web server responses. Usefull to determining the quality of a specific web server as time source.
-h
Show help.
-i
Set the pid file (default /var/run/htpdate.pid).
-l
Use syslog for output (levels LOG_WARNING and LOG_INFO). Convinient if you use htpdate from cron.

-m -M
These options specify the minimum (-m) and maximum (-M) polling intervals for HTP requests, in seconds to the power of two. The default range is 10 (1024 s) until 18 (3 days). Htpdate calculates the optimal polling frequency between minimum and maximum values. Only applicable when running in daemon mode.
-p
Precision (in milliseconds) specifies the operating accuracy of htpdate. Internally htpdate uses a different algorithm to detect a time offset, when precision is specified. Precision only has effect in daemon mode. Use with causion.
-q
Query web server and display time, but do not change time (default in interactive mode).
-s
Set time immediate. In daemon mode -s only applies the first poll.
-t
Turn off sanity time check. By default a time offset larger than a year, compared to current localtime, is rejected. With -t set, any time stamp will be accepted.
-D
Run as daemon (requires root priviledges).
-P
Proxy server hostname or ip-address.
host
Web server hostname or ip-address. Upto 16 hosts may be specified, but in general 3 to 5 hosts should be enough for a redundant and accurate setup.
port
Portnumber (default 80 and 8080 for proxy server)

EXAMPLES

Request time from web server (don't update local clock):
htpdate -q www.google.com www.yahoo.com

Verbose output (don't update local clock):
htpdate -d -q www.google.com www.yahoo.com

Adjust time smoothly and log output to syslog (eg. cron):
htpdate -a -l www.google.com www.yahoo.com

HTTP/1.1 query in IPv6 literal format (RFC 2732):
htpdate -1 [2001:DB8:1af6::123]:80

Run htpdate as daemon:
htpdate -D www.google.com www.yahoo.com

AUTHOR

Eddy Vervest (http://www.clevervest.com/htp/)

SEE ALSO

rdate, timed, ntpd, adjtimex, HTP implementation by Roy Keene (http://www.rkeene.org/oss/htp/)


4578880 [rkeene@sledge /home/rkeene/devel/htp/mirror]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2005-11-22 18:23:13