2015年8月18日 星期二

Synchronize the time with the Windows Time service 網路校時

English
========================================================================

W32tm

25 out of 56 rated this helpful Rate this topic
A tool used to diagnose problems occurring with Windows Time

Syntax

{/config [/computer:ComputerName] [ [/update] [/manualpeerlist:ListOfComputerNames] ] [/syncfromflags:ListOfFlags] ]|/monitor|/ntte|/ntpte|/register|/resync [{:ComputerName] [/nowait]|[/rediscover}]|/tz|/unregister}

Parameters

/config [ /computer: ComputerName ] [ [ /update ] [ /manualpeerlist: ListOfComputerNames ] ] [ /syncfromflags: ListOfFlags Adjusts the time settings on the local or target computer. Time synchronization peers can be set with the /manualpeerlist switch. Changes to configuration are not used by Windows Time unless the service is restarted or the /update switch is used. /syncfromflags can be used to set the types of sources used for synchronization, and can be set to either MANUAL to use the manual peer list or DOMHIER to synchronize from a domain controller.
/monitor   Monitors the target computer or list of computers.
/ntte   Converts an NT system time into a readable format.
/ntpte   Converts an NTP time into a readable format.
/register   Register to run as a service and add default configuration to the registry.
/resync [{ : ComputerName ] [ /nowait ]|[ /rediscover }] Resynchronize the clock as soon as possible, disregarding all accumulated error statistics. If no computer is specified, the local computer will resynchronize. The command will wait for resynchronization unless the/nowait switch is used. Currently used time resources will be used unless /rediscover is used, which will force redetection of network resourced before resynchronization.
/ tz   Display the current time zone settings.
/ unregister   Unregister service and remove all configuration information from the registry.
/?   Displays help at the command prompt.

Remarks

  • This tool is designed for network administrators to use for diagnosing problems with Windows Time.
    For more information, see net time in Related Topics.
  • For the Windows Time service to use the changed made with W32tm, it must be notified of the changes. To notify Windows Time, at the command prompt, type w32tm /config /update.

Examples

To display the current time zone settings, type:
w32tm /tz

Reference: MSDN



中文
========================================================================
網路校時是個很常用的工具,以下附上一些較常用的資訊供讀者參考:

1. 可以透過 cmd 下輸入 "w32tm /dumpreg /subkey:Config",去查看現在網路校時的設定


介紹一下其中兩個參數的意思,
1-1 MaxNegPhaseCorrection:此參數為負差校正,若網路時間比本地時間慢,慢的數值超過此值,即不自動校正。
1-2 MaxPosPhaseCorrection:此參數為正差校正,若網路時間比本地時間快,快的數值超過此值,即不自動校正。

此兩個數值可以在 Registry 內做更改,Registry 位置在 "HKey_Local_MACHINE\SYSTEM\CurrentControlSet\Service\W32Time\Config"。

更改完後,需在 cmd 下輸入 "w32tm /config /update"去更新組態,再輸入 "w32tm /resync"去重新網路校時。

沒有留言:

OS Operating System 作業系統 恐龍書 筆記分享

發現一個作業系統說明的網站, 對於 process vs thread, semaphore vs mutex, deadlock 說明很詳細, 有興趣的人可以去以下的網頁逛逛。 附上網址連結: link   link2