• No results found

6. The TimeSync Command Interface

6.1 ADD Command

The ADD command adds a new TimeSource to the TimeSync configuration. The

command can be issued as a command-line parameter or can be entered interactively at a TimeCom prompt. The ADD command can only be issued against the local TimeSync server.

<ip address> - the ip address of the new time source.

HP NonStop Time Synchronization User’s Guide Page 54 of 86 <host name> - the DNS host name of the new time source.

<remote port number> - the port number of the new time source. Examples

timecom

> add TimeSources 16.32.101.10:123

timecom –add TimeSources 17.34.45.56:19095

6.2 CONF Command

The CONF command instructs the TimeSync server to load the specified configuration file. The CONF command can only be issued against the local TimeSync server. The command can be issued as a command-line parameter or can be entered interactively at a TimeCom prompt.

It is important to distinguish between the CONF command and the SERVERCONF command. The CONF command causes the TimeSync process to load the specified configuration file, while the SERVERCONF command causes TimeCom to load the specified configuration file.

<filename> - is the name of the configuration file to load. If <filename> is not provided, TimeSync will load the default configuration file from the default location.

Examples timecom

> conf /etc/timesync/myconf.conf timecom –conf $USERS.DATA.TIMECNF

6.3 FC Command

The FC command edits and re-executes the prior TimeCom command. When you enter the FC command, TimeCom displays the prior command executed, and on the

HP NonStop Time Synchronization User’s Guide Page 55 of 86

subsequent line displays a single “.” prompt; this is known as an “editing template”. You can then edit the prior command using subcommands, as described below. After you enter the subcommands you want, press the RETURN key. Your edited command and a new editing template then appear. If you want to make more corrections to the edited command, you can enter more subcommands in the editing template and then press RETURN. If the edited command is correct, you can re-execute it by pressing RETURN without entering any subcommands.

The syntax of the editing template is <subcommand> [ //<subcommand> ] …: <subcommand> is any of the following:

{ R | r } <replacement-text> { I | i } <insertion-text> { D | d }

{ R | r } <replacement-text>

replaces characters in the previous command, starting with the character displayed immediately above the R or r. A <replacement-text> preceded by R or r can be any string of characters, including spaces, and can itself begin with R, I, or D (or r, i, or d). Characters in <replacement-text> replace characters in the previous command on a one- for-one basis. If // follows this subcommand, all characters in <replacement-text> up to //, including spaces, replace characters in the previous command. Otherwise,

replacement ends with the RETURN. { I | i } <insertion-text>

inserts characters into the previous command in front of the character displayed above the I or i. If // follows this subcommand, all characters in <insertion-text> up to //,

including spaces, are inserted into the previous command. If no // appears, all characters up to the RETURN are inserted.

{ D | d }

deletes characters in the previous command. Any original character displayed above a D or d that begins a subcommand in the editing template is deleted.

<replacement-text> FC

HP NonStop Time Synchronization User’s Guide Page 56 of 86

is any text that does not begin with R, I, or D (or r, i, or d). Characters in <replacement- text> replace characters immediately above them on a one-for-one basis. For example, a D in <replacement-text> replaces the character displayed above it instead of deleting it. <insertion-text>

is any text that does not begin with R, I, or D (or r, i, or d). Characters in <insertion-text> are inserted into the prior command immediately in front of the character displayed by the I or i.

//

is a separator, allowing multiple subcommands on a given line. A subcommand can immediately follow one or more uppercase or lowercase D’s without being preceded by //. Examples timecom > add TimeSources 16.32.101.10 > fc > add TimeSources 16.32.101.10 . dddiremove > remove TimeSources 16.32.101.10 .

6.4 INFO Command

The INFO command will retrieve information about TimeSync configuration settings from a system running TimeSync. The command can be issued as a command-line parameter or can be entered interactively at a TimeCom prompt.

<system> - is the IP address or DNS name and optional port number of the server from which information is to be retrieved. For example, system 11.12.13.14, system

11.12.13.14:1234, system dns.host.name, or system dns.host.name:1234. If <system> is not supplied, the local system will be used.

HP NonStop Time Synchronization User’s Guide Page 57 of 86 BRIEF - shows a partial list of the configuration information.

Examples timecom >info

System Local system:123 (127.0.0.1)

-- TimeSync Settings --

Version : 1.4.401, 15 August 2014, 18:00

Program File Name : C:\Program Files\HP\TimeSync\TimeSync.exe Process ID : 1948

Configuration File : C:\Program Files\HP\TimeSync\timesync.conf

ServerMode : True AlwaysSendRefTS : True ClientMode : True DriftBackward : True DriftBackwardThreshold : -1 DriftForward : True DriftForwardThreshold : -1 MaxReplyDeviation : 300000 MaxReplyWindow : 5000 ModifyClockRate : True MultiSource : False RetryInterval : 60 RetryLimit : -1 ReportOnly : False SyncAt : UpdateInterval : 3600 TimeSource : 192.168.1.253:123 AutoSave : True GMTOffset : 0

HP NonStop Time Synchronization User’s Guide Page 58 of 86 LocalAddress : 192.168.1.107 LocalPort : 123 Transport : RunAsService : True LogEnabled : False

LogFileName : C:\Program Files\HP\TimeSync\timesynclog.txt LogLevel : 3 LogClearOnOpen : False LogDeleteOnClose : False LogHTMLFormat : False LogSuppress : True TraceEnabled : False

TraceFileName : C:\Program Files\HP\TimeSync\timesynctrace.txt TraceHTMLFormat : False

TraceMask : 0x00000003 TraceRecordLimit : 1000

TraceWrap : False

6.5 REMOVE Command

The REMOVE command removes one or more TimeSources from the TimeSync configuration. The command can be issued as a command-line parameter or can be entered interactively at a TimeCom prompt. The REMOVE command can only be issued against the local TimeSync server.

<ip address> - the ip address of the time source to be removed.

REMOVE TimeSources {<IP address> | <host name>}[:<remote port

HP NonStop Time Synchronization User’s Guide Page 59 of 86 <host name> - the DNS host name of the time source to be removed.

<remote port number> - the port number for the time source to be removed Examples

timecom

> remove TimeSources 16.32.101.10:123

timecom –remove TimeSources 17.34.45.56:19095

6.6 SAVE Command

The SAVE command saves current TimeSync option settings to the TimeSync

configuration file on the specified system. SAVE is redundant if AutoSave is set to True in the TimeSync configuration file. The command can be issued as a command-line parameter or can be entered interactively at a TimeCom prompt. The SAVE command can only be issued against the local TimeSync server. Note that issuing the SAVE command does not alter the default configuration file name that will be used the next time TimeSync is started. TimeSync always defaults to using timesync.conf/TSCONF as the configuration file; you must use the –conf command-line option to override this at startup time, even if you previously did a SAVE and specified a different configuration file name.

<filename> - is the name of the configuration file to save. If <filename> is not provided, TimeSync will save configuration data to the default configuration file.

Examples timecom > save

timecom –save /etc/timesync/mytimesync.conf

6.7 SERVERCONF Command

The SERVERCONF command instructs the TimeCom CI to load the specified configuration file.

HP NonStop Time Synchronization User’s Guide Page 60 of 86

It is important to distinguish between the CONF command and the SERVERCONF command. The CONF command causes the TimeSync process to load the specified configuration file, while the SERVERCONF command causes TimeCom to load the specified configuration file.

<filename> - is the name of the configuration file to load. If <filename> is not provided, TimeCom will load the default configuration file from the default location.

Examples timecom

> serverconf /etc/timeSync/myconf.conf timecom –serverconf $USERS.DATA.TIMECNF

timecom –serverconf $USERS.DATA.TIMECNF; –add TimeSources 12.13.134.234

6.8 SET Command

The SET command alters configuration settings online for the TimeSync process. The command can be issued as a command-line parameter or can be entered interactively at a TimeCom prompt. The SET command can only be issued against the local TimeSync server.

<option> <value> - is one of the following SET options and values. For details of each, see the description of the various configuration file options in Configuration Options.

RunAsService True | False LocalAddress <ipaddress> SERVERCONF [<filename>]

HP NonStop Time Synchronization User’s Guide Page 61 of 86 LocalPort <port number>

GMTOffset <seconds>

Transport <Guardian process name> AutoSave True | False

ServerMode True | False

AlwaysSendRefTS True | False

ClientMode True | False

DriftBackward True | False DriftBackwardThreshold <milliseconds> DriftForward True | False DriftForwardThreshold <milliseconds> MaxReplyDeviation <milliseconds> MaxReplyWindow <milliseconds> ModifyClockRate True | False

MultiSource True | False

RetryInterval <seconds> RetryLimit <count>

ReportOnly True | False

SyncAt <sync time> [, <sync time>, …]

TimeSources <ipaddress> | <DNS name>[:<port>] [, <ipaddress> | <DNS name>, …] UpdateInterval <seconds>

LogClearOnOpen True | False LogDeleteOnClose True | False

LogEnabled True | False

HP NonStop Time Synchronization User’s Guide Page 62 of 86 LogFileName <filename>

LogHTMLFormat True | False

LogSuppress True | False

TraceEnabled True | False TraceMask <trace mask> TraceFileName <filename> TraceRecordLimit 0 - 2147483647

TraceWrap True | False

TraceHTMLFormat True | False Examples

timecom

> set LogEnabled False

timecom –set LogEnabled False

6.9 SHOW Command

The SHOW command outputs current configuration settings from the TimeCom CI.

Examples Timecom > show

TimeCom Settings:

Target System 192.168.1.107:123 (Local system) Local Address 192.168.1.107

timecom –show SHOW

HP NonStop Time Synchronization User’s Guide Page 63 of 86 TimeCom Settings:

Target System 16.102.111.12:123 (Local system) Local Address 127.0.0.1

Transport $ZTC04

6.10 STATUS Command

The STATUS command returns information about TimeSync on the server identified in the command. The command can be issued as a command-line parameter or can be entered interactively at a TimeCom prompt.

<system> - is the IP address or DNS name and optional port number of the server from which information is to be retrieved. For example, system 11.12.13.14, system

11.12.13.14:1234, system dns.host.name, or system dns.host.name:1234. If <system> is not supplied, the local system will be used.

Note that a negative clock difference value indicates that the local system clock is too fast and needs to slow down or move backward; a positive value indicates that the local system clock is too slow and needs to speed up or move forward.

Examples timecom >status

System Local system:123 (127.0.0.1)

-- TimeSync System Status --

Current Time (GMT/UTC) : 2014-04-25 02:45:19.213656 Configured TimeSync GMTOffset : 0

Last Update Attempt Time (GMT/UTC) : 2014-04-25 02:44:19.180901 Last Update Attempt Result : Successful

HP NonStop Time Synchronization User’s Guide Page 64 of 86 Last Successful Update Time (GMT/UTC) : 2014-04-25 02:44:19.180901 Clock Difference At Last Update : 0.139 seconds

Source For Last Update : 16.212.136.58

Next Update Time (GMT/UTC) : 2014-04-25 03:00:00.000000

6.11 SYNCNOW Command

The SYNCNOW command causes TimeSync to immediately initiate a time

synchronization operation, regardless of when the next sync operation is scheduled to occur.

ClientMode must be enabled in order to initiate a sync operation. If TimeSync is

configured to sync at a specified interval via the UpdateInterval value, the next normally scheduled sync time will be adjusted to occur at UpdateInterval seconds after the

SYNCNOW operation was completed. If TimeSync is configured to sync at specific times via the SYNCAT list, subsequent sync operations will continue to occur as scheduled; the SYNCNOW operation will not affect those scheduled sync times.

<system> - is the IP address or DNS name and optional port number of the server from which information is to be retrieved. For example, system 11.12.13.14, system

11.12.13.14:1234, system dns.host.name, or system dns.host.name:1234. If <system> is not supplied, the local system will be used.

Examples timecom >syncnow

System Local system:123 (127.0.0.1)

Clock synchronization initiated SYNCNOW [SYSTEM <system> ]

HP NonStop Time Synchronization User’s Guide Page 65 of 86

6.12 SYSTEM Command

The SYSTEM command sets the IP address or DNS name and optional port number of a TimeSync server in the TimeCom CI. TimeCom will then send all further INFO and STATUS commands to the specified TimeSync server. The command can be issued as a command-line parameter or can be entered interactively at a TimeCom prompt.

<IP address> - is the IP address of a remote TimeSync server. <DNS name> - is the DNS name of a remote TimeSync server.

<port> - is the optional port number of the remote TimeSync server. If <port> is not specified the port number defined in the TimeSync configuration file will be used.

Note: If SYSTEM is entered without specifying any parameters the TimeCom CI will resume communication with the local copy of the TimeSync server.

Examples timecom

> system 16.102.111.12

timecom SYSTEM 11.12.13.14:1234; INFO; STATUS SYSTEM [<IP address> | <DNS name>[:<port>]]

HP NonStop Time Synchronization User’s Guide Page 66 of 86

7. Appendix A: TimeSync Event

Related documents