none
NTP Time offset alert not alerting? RRS feed

  • Question

  • I have an NTP script that works in power shell and displays a numerical value stored in variable $TIME for SCOM to read. The monitor is setup like the following just to test the alert i.e. Property[@Name='TIME'] Unhealthy greater or equal to 0. I do get a Power Shell script failed to run error when I intentionally screw up the script so I know SCOM is running the script.

    I receive no Alerts. Here is the power shell below. Should the property bag be above the CmdletBinding?

    ----------------------------------------------------------------------------------------------------

    [CmdletBinding()]
    
    [OutputType('NtpTime')]
    
    Param (
    
        [String]$Server = 'Domain.com',
    
        [Int]$MaxOffset = 10000,     # (Milliseconds) Throw exception if network time offset is larger
    
    [Switch]$NoDns # Do not attempt to lookup V3 secondary-server referenceIdentifier
    
    )
    
    #import-module ntptime -ErrorAction stop
    
     
    
    $api=New-Object -comObject "MOM.ScriptAPI"
    
    $PropertyBag = $api.CreatePropertyBag()
    
     
    
    $ntpTimeObj = get-ntptime -Server 'Domain.com' -MaxOffset 10000 -NoDNS
    
    $a=$NtpTimeObj.offsetseconds
    
    if($a -lt 0){$b=[decimal]$a * 100 * -1}else {$b=[decimal]$a * 100}
    
    $TIME=[int]$b
    
    write-host $TIME
    
     
    
    $PropertyBag.AddValue("TIME",$TIME)
    
    $PropertyBag
    





    • Edited by KLIFTIN Wednesday, February 14, 2018 9:04 AM
    Tuesday, February 13, 2018 5:00 PM

Answers

  • Hi, 

    I just found the module with the function you are using:

    NtpTime 1.1

    but could not find neither the param "-NoDNS" nor "MaxOffset"

    I see that those are defined in the long script you've posted, but not as params for the Get-NtpTime function you are using in the short version. 

    I continue to think that there is something worng with the script. 

    Do you have the module NtpTime 1.1 imported on the agent, running the script`?

    Regards,


    Stoyan (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov

    • Marked as answer by KLIFTIN Friday, February 16, 2018 11:28 AM
    Wednesday, February 14, 2018 9:58 AM
    Moderator
  • Also I knew it reminded me of something... there is already a MP for ntp time drift monitoring!

    https://gallery.technet.microsoft.com/SCOM-Management-Pack-to-bca30237

    • Marked as answer by KLIFTIN Friday, February 16, 2018 11:28 AM
    Wednesday, February 14, 2018 1:20 PM

All replies

  • Can you post all the monitor's xml?
    Wednesday, February 14, 2018 7:23 AM
  • Are you running the script, using the Squared Up PowerShell MP?

    Regards,


    Stoyan (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov

    Wednesday, February 14, 2018 8:32 AM
    Moderator
  • Can you post all the monitor's xml?

    Yes here you go, I cut out some irrelevant parts and also pasted the error which I don't get in power shell but do get in a SCOM warning "Power Shell SCript failed to run". The contents of both errors are below.

    Accessibility="Public" Enabled="true" Target="MicrosoftWindowsLibrary7585010!Microsoft.Windows.Server.Computer" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Powershell!Wei.Out.There.TimedPowershell.v2.TwoStateMonitorType" ConfirmDelivery="false">
            <Category>Custom</Category>
            <AlertSettings AlertMessage="UIGeneratedMonitor7dbca856104140d096eca29a2d294fa4_AlertMessageResourceID">
              <AlertOnState>Warning</AlertOnState>
              <AutoResolve>true</AutoResolve>
              <AlertPriority>Normal</AlertPriority>
              <AlertSeverity>Error</AlertSeverity>
            </AlertSettings>
            <OperationalStates>
              <OperationalState ID="UIGeneratedOpStateId584ec2e0dee04c2990f002c3a6fe6e21" MonitorTypeStateID="Success" HealthState="Success" />
              <OperationalState ID="UIGeneratedOpStateId7931b3cce2b042f89587e1239f4b222a" MonitorTypeStateID="Error" HealthState="Warning" />
            </OperationalStates>
            <Configuration>
              <IntervalSeconds>180</IntervalSeconds>
              <SyncTime />
              <TimeoutSeconds>60</TimeoutSeconds>
              <ScriptName>xxxxNTPResponse.ps1</ScriptName>
              <Arguments />
              <ScriptBody>[CmdletBinding()]
    [OutputType('NtpTime')]
    Param (
        [String]$Server = 'domain.com',
        [Int]$MaxOffset = 10000,     # (Milliseconds) Throw exception if network time offset is larger
        [Switch]$NoDns               # Do not attempt to lookup V3 secondary-server referenceIdentifier
    )
    #import-module ntptime -ErrorAction stop
    
    $api=New-Object -comObject "MOM.ScriptAPI"
    $PropertyBag = $api.CreatePropertyBag()
    
    $ntpTimeObj = get-ntptime -Server 'Domain.com' -MaxOffset 10000 -NoDNS
    $a=$NtpTimeObj.offsetseconds
    if($a -lt 0){$b=[decimal]$a * 100 * -1}else {$b=[decimal]$a * 100}
    $TIME=[int]$b
    write-host $TIME
    
    $PropertyBag.AddValue("TIME",$TIME)
    $PropertyBag</ScriptBody>
              <ErrorExpression>
                <SimpleExpression>
                  <ValueExpression>
                    <XPathQuery Type="String">Property[@Name="TIME"]</XPathQuery>
                  </ValueExpression>
                  <Operator>GreaterEqual</Operator>
                  <ValueExpression>
                    <Value Type="String">0</Value>
                  </ValueExpression>
                </SimpleExpression>
              </ErrorExpression>
              <SuccessExpression>
                <SimpleExpression>
                  <ValueExpression>
                    <XPathQuery Type="String">Property[@Name="TIME"]</XPathQuery>
                  </ValueExpression>
                  <Operator>Less</Operator>
                  <ValueExpression>
                    <Value Type="String">0</Value>
        

    The error from the SCOM alert is below

    The PowerShell script failed with below exception
    
    System.Management.Automation.ParameterBindingException: A parameter cannot be found that matches parameter name 'Arguments'.
    at System.Management.Automation.CmdletParameterBinderController.VerifyArgumentsProcessed(ParameterBindingException originalBindingException)
    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
    at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
    at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
    at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)

    Wednesday, February 14, 2018 9:00 AM
  • Hi,

    I just noticed the error "A parameter cannot be found that matches parameter name 'Arguments'."

    Have you tried running the script locally to check the result? It seemsit has some issue with a specific parameter, being supplied....

    P.S. Just checked the "Get-NtpTime" cmdlet and could find one. I found a couple of scripts in the Internet where this is defined as a function, but you haven't defined it in your script. Could this be the key?

    Regards,


    Stoyan (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov


    Wednesday, February 14, 2018 9:11 AM
    Moderator
  • Are you running the script, using the Squared Up PowerShell MP?

    Regards,



    No I'm using the two state monitor from the SCOM sample power shell management pack. I have other response time scripts that work (I didn't make them) and the settings appear the same with the exception of the actual script and placement of the property bag.
    Wednesday, February 14, 2018 9:14 AM
  • Are you running the script, using the Squared Up PowerShell MP?

    Regards,



    No I'm using the two state monitor from the SCOM sample power shell management pack. I have other response time scripts that work (I didn't make them) and the settings appear the same with the exception of the actual script and placement of the property bag.

    Can you please check the script again. I think you need to define the Get-NtpTime as a function, hence the errror. :)

    Stoyan (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov

    Wednesday, February 14, 2018 9:23 AM
    Moderator
  • Hi,

    I just noticed the error "A parameter cannot be found that matches parameter name 'Arguments'."

    Have you tried running the script locally to check the result? It seemsit has some issue with a specific parameter, being supplied....

    Regards,


    I'm not a power shell guy so I'm not too familiar with troubleshooting but yes, I can actually run it locally. It puts a number into variable $TIME which tells me the offset in milliseconds that the servers time is off compared to NTP time. That value goes into SCOM as you can see by Property=TIME and if the value is not below 0, then send an alert. But instead I get a Power shell warning and no alert at all.
    Wednesday, February 14, 2018 9:23 AM
  • P.S. Just checked the "Get-NtpTime" cmdlet and could find one. I found a couple of scripts in the Internet where this is defined as a function, but you haven't defined it in your script. Could this be the key?

    Regards,



    I do have NtpTime in the script line 13 but don't know what you mean by defined as a function. Sorry. The script works, spits out the offset in the variable $TIME. But SCOM obviously has a hard time reading it.

    $ntpTimeObj=get-ntptime-Server'Domain.com'-MaxOffset10000-NoDNS


    • Edited by KLIFTIN Wednesday, February 14, 2018 9:32 AM
    Wednesday, February 14, 2018 9:30 AM
  • So here is the original script before it was cut down. But this was not working for me either.

    $api=New-Object -comObject "MOM.ScriptAPI"
    $PropertyBag = $api.CreatePropertyBag()
    
    [CmdletBinding()]
    
     Param (
         [String]$Server = "Domain.com",
         [Int]$MaxOffset = 100,     # (Milliseconds) Throw exception if network time offset is larger
         [Switch]$NoDns               # Do not attempt to lookup V3 secondary-server referenceIdentifier
     )
    
     Set-StrictMode -Version 3
    
    
         # NTP Times are all UTC and are relative to midnight on 1/1/1900
         $StartOfEpoch=New-Object DateTime(1900,1,1,0,0,0,[DateTimeKind]::Utc)   
         
         Function OffsetToLocal($Offset) {
         # Convert milliseconds since midnight on 1/1/1900 to local time
             $StartOfEpoch.AddMilliseconds($Offset).ToLocalTime()
         }
    
    
         # Construct a 48-byte client NTP time packet to send to the specified server
         # (Request Header: [00=No Leap Warning; 011=Version 3; 011=Client Mode]; 00011011 = 0x1B)
    
         [Byte[]$NtpData = ,0 * 48
         $NtpData[0] = 0x1B    # NTP Request header in first byte
         
    
         $Socket = New-Object Net.Sockets.Socket([Net.Sockets.AddressFamily]::InterNetwork,
                                                 [Net.Sockets.SocketType]::Dgram,
                                                 [Net.Sockets.ProtocolType]::Udp)
         $Socket.SendTimeOut = 2000  # ms
         $Socket.ReceiveTimeOut = 2000   # ms
    
         Try {
             $Socket.Connect($Server,123)
         }
         Catch {
             Write-Error "Failed to connect to server $Server"
             Throw 
         }
    
    
     # NTP Transaction -------------------------------------------------------
    
             $t1 = Get-Date    # t1, Start time of transaction... 
         
             Try {
                 [Void]$Socket.Send($NtpData)
                 [Void]$Socket.Receive($NtpData)  
             }
             Catch {
                 Write-Error "Failed to communicate with server $Server"
                 Throw
             }
    
             $t4 = Get-Date    # End of NTP transaction time
    
     # End of NTP Transaction ------------------------------------------------
    
         $Socket.Shutdown("Both") 
         $Socket.Close()
    
     # We now have an NTP response packet in $NtpData to decode.  Start with the LI flag
     # as this is used to indicate errors as well as leap-second information
    
         # Check the Leap Indicator (LI) flag for an alarm condition - extract the flag
         # from the first byte in the packet by masking and shifting 
    
         $LI = ($NtpData[0] -band 0xC0) -shr 6    # Leap Second indicator
         If ($LI -eq 3) {
             Throw 'Alarm condition from server (clock not synchronized)'
         } 
    
         # Decode the 64-bit NTP times
    
         # The NTP time is the number of seconds since 1/1/1900 and is split into an 
         # integer part (top 32 bits) and a fractional part, multipled by 2^32, in the 
         # bottom 32 bits.
    
         # Convert Integer and Fractional parts of the (64-bit) t3 NTP time from the byte array
         $IntPart = [BitConverter]::ToUInt32($NtpData[43..40],0)
         $FracPart = [BitConverter]::ToUInt32($NtpData[47..44],0)
    
         # Convert to Millseconds (convert fractional part by dividing value by 2^32)
         $t3ms = $IntPart * 1000 + ($FracPart * 1000 / 0x100000000)
    
         # Perform the same calculations for t2 (in bytes [32..39]) 
         $IntPart = [BitConverter]::ToUInt32($NtpData[35..32],0)
         $FracPart = [BitConverter]::ToUInt32($NtpData[39..36],0)
         $t2ms = $IntPart * 1000 + ($FracPart * 1000 / 0x100000000)
    
         # Calculate values for t1 and t4 as milliseconds since 1/1/1900 (NTP format)
         $t1ms = ([TimeZoneInfo]::ConvertTimeToUtc($t1) - $StartOfEpoch).TotalMilliseconds
         $t4ms = ([TimeZoneInfo]::ConvertTimeToUtc($t4) - $StartOfEpoch).TotalMilliseconds
    
         # Calculate the NTP Offset and Delay values
         $Offset = (($t2ms - $t1ms) + ($t3ms-$t4ms))/2
         $Delay = ($t4ms - $t1ms) - ($t3ms - $t2ms)
    
         # Make sure the result looks sane...
         If ([Math]::Abs($Offset) -gt $MaxOffset) {
             # Network server time is too different from local time
             Throw "Network time offset exceeds maximum ($($MaxOffset)ms)"
         }
    
         # Decode other useful parts of the received NTP time packet
    
         # We already have the Leap Indicator (LI) flag.  Now extract the remaining data
         # flags (NTP Version, Server Mode) from the first byte by masking and shifting (dividing)
    
         $LI_text = Switch ($LI) {
             0    {'no warning'}
             1    {'last minute has 61 seconds'}
             2    {'last minute has 59 seconds'}
             3    {'alarm condition (clock not synchronized)'}
         }
    
         $VN = ($NtpData[0] -band 0x38) -shr 3    # Server version number
    
         $Mode = ($NtpData[0] -band 0x07)     # Server mode (probably 'server')
         $Mode_text = Switch ($Mode) {
             0    {'reserved'}
             1    {'symmetric active'}
             2    {'symmetric passive'}
             3    {'client'}
             4    {'server'}
             5    {'broadcast'}
             6    {'reserved for NTP control message'}
             7    {'reserved for private use'}
         }
    
         # Other NTP information (Stratum, PollInterval, Precision)
    
         $Stratum = [UInt16]$NtpData[1]   # Actually [UInt8] but we don't have one of those...
         $Stratum_text = Switch ($Stratum) {
             0                            {'unspecified or unavailable'}
             1                            {'primary reference (e.g., radio clock)'}
             {$_ -ge 2 -and $_ -le 15}    {'secondary reference (via NTP or SNTP)'}
             {$_ -ge 16}                  {'reserved'}
         }
    
         $PollInterval = $NtpData[2]              # Poll interval - to neareast power of 2
         $PollIntervalSeconds = [Math]::Pow(2, $PollInterval)
    
         $PrecisionBits = $NtpData[3]      # Precision in seconds to nearest power of 2
         # ...this is a signed 8-bit int
         If ($PrecisionBits -band 0x80) {    # ? negative (top bit set)
             [Int]$Precision = $PrecisionBits -bor 0xFFFFFFE0    # Sign extend
         } else {
             # ..this is unlikely - indicates a precision of less than 1 second
             [Int]$Precision = $PrecisionBits   # top bit clear - just use positive value
         }
         $PrecisionSeconds = [Math]::Pow(2, $Precision)
         
       
         If ($Stratum -le 1) {
             # Response from Primary Server.  RefId is ASCII string describing source
             $ReferenceIdentifier = [String]([Char[]$NtpData[12..15] -join '')
         }
         Else {
    
             # Response from Secondary Server; determine server version and decode
    
             Switch ($VN) {
                 3       {
                             # Version 3 Secondary Server, RefId = IPv4 address of reference source
                             $ReferenceIdentifier = $NtpData[12..15] -join '.'
    
                             If (-Not $NoDns) {
                                 If ($DnsLookup =  Resolve-DnsName $ReferenceIdentifier -QuickTimeout -ErrorAction SilentlyContinue) {
                                     $ReferenceIdentifier = "$ReferenceIdentifier <$($DnsLookup.NameHost)>"
                                 }
                             }
                             Break
                         }
    
                 4       {
                             # Version 4 Secondary Server, RefId = low-order 32-bits of  
                             # latest transmit time of reference source
                             $ReferenceIdentifier = [BitConverter]::ToUInt32($NtpData[15..12],0) * 1000 / 0x100000000
                             Break
                         }
    
                 Default {
                             # Unhandled NTP version...
                             $ReferenceIdentifier = $Null
                         }
             }
         }
    
    
         # Calculate Root Delay and Root Dispersion values
         
         $RootDelay = [BitConverter]::ToInt32($NtpData[7..4],0) / 0x10000
         $RootDispersion = [BitConverter]::ToUInt32($NtpData[11..8],0) / 0x10000
    
    
         # Finally, create output object and return
    
         $NtpTimeObj = [PSCustomObject]@{
             NtpServer = $Server
             NtpTime = OffsetToLocal($t4ms + $Offset)
             Offset = $Offset
             OffsetSeconds = [Math]::Round($Offset/1000, 3)
             Delay = $Delay
             t1ms = $t1ms
             t2ms = $t2ms
             t3ms = $t3ms
             t4ms = $t4ms
             t1 = OffsetToLocal($t1ms)
             t2 = OffsetToLocal($t2ms)
             t3 = OffsetToLocal($t3ms)
             t4 = OffsetToLocal($t4ms)
             LI = $LI
             LI_text = $LI_text
             NtpVersionNumber = $VN
             Mode = $Mode
             Mode_text = $Mode_text
             Stratum = $Stratum
             Stratum_text = $Stratum_text
             PollIntervalRaw = $PollInterval
             PollInterval = New-Object TimeSpan(0,0,$PollIntervalSeconds)
             Precision = $Precision
             PrecisionSeconds = $PrecisionSeconds
             ReferenceIdentifier = $ReferenceIdentifier
             RootDelay = $RootDelay
             RootDispersion = $RootDispersion
             Raw = $NtpData   # The undecoded bytes returned from the NTP server
         }
    
         # Set the default display properties for the returned object
         [String[]$DefaultProperties =  'NtpServer', 'NtpTime', 'OffsetSeconds', 'NtpVersionNumber', 
                                         'Mode_text', 'Stratum', 'ReferenceIdentifier'
    
         # Create the PSStandardMembers.DefaultDisplayPropertySet member
         $ddps = New-Object Management.Automation.PSPropertySet('DefaultDisplayPropertySet', $DefaultProperties)
    
         # Attach default display property set and output object
         $PSStandardMembers = [Management.Automation.PSMemberInfo[]$ddps 
         $NtpTimeObj | Add-Member -MemberType MemberSet -Name PSStandardMembers -Value $PSStandardMembers -PassThru
    
     $a=$NtpTimeObj.offsetseconds
     if($a -lt 0){$b=[decimal]$a * 100 * -1}else {$b=[decimal]$a * 100}
     $TIME=[int]$b
     write-host $TIME
    
     $PropertyBag.AddValue("TIME",$TIME)
     $PropertyBag 

    Wednesday, February 14, 2018 9:39 AM
  • Hi, 

    I just found the module with the function you are using:

    NtpTime 1.1

    but could not find neither the param "-NoDNS" nor "MaxOffset"

    I see that those are defined in the long script you've posted, but not as params for the Get-NtpTime function you are using in the short version. 

    I continue to think that there is something worng with the script. 

    Do you have the module NtpTime 1.1 imported on the agent, running the script`?

    Regards,


    Stoyan (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov

    • Marked as answer by KLIFTIN Friday, February 16, 2018 11:28 AM
    Wednesday, February 14, 2018 9:58 AM
    Moderator
  • Do you have the module NtpTime 1.1 imported on the agent, running the script`?

    I'll check it out.
    Wednesday, February 14, 2018 11:23 AM
  • Do you have the module NtpTime 1.1 imported on the agent, running the script`?

    Edit: Ah, I noticed the other management server does not have it. I had to upgrade to Framework 5.1 and now it says I need NuGet package ugh. I'll upgrade the other server later.



    • Edited by KLIFTIN Wednesday, February 14, 2018 1:06 PM
    Wednesday, February 14, 2018 12:54 PM
  • Hi,

    you can type ntptime indeed, but your script uses "Get-NtpTime" cmdlet. This is from your script:

    $ntpTimeObj = get-ntptime -Server 'Domain.com' -MaxOffset 10000 -NoDNS

    you see the "get-ntptime" part..This is what I am missing...In the module, the params -MaxOffset and -NoDNS are not there.

    That is what I am missing :(

    Regards,


    Stoyan (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov

    Wednesday, February 14, 2018 12:58 PM
    Moderator
  • Hi,

    you can type ntptime indeed, but your script uses "Get-NtpTime" cmdlet. This is from your script:

    $ntpTimeObj = get-ntptime -Server 'Domain.com' -MaxOffset 10000 -NoDNS

    you see the "get-ntptime" part..This is what I am missing...In the module, the params -MaxOffset and -NoDNS are not there.

    That is what I am missing :(

    Regards,


    Oh gotcha, in any case I upgraded anyways I just need to find and install the NuGet package. A requirement for me to install-module ntptime. Thanks again I'll report back
    Wednesday, February 14, 2018 1:05 PM
  • Also you need to have the module on every monitored server (since the monitor is targeted at Windows.Server.Computer), not only on the SCOM Management Servers!
    Wednesday, February 14, 2018 1:18 PM
  • Also I knew it reminded me of something... there is already a MP for ntp time drift monitoring!

    https://gallery.technet.microsoft.com/SCOM-Management-Pack-to-bca30237

    • Marked as answer by KLIFTIN Friday, February 16, 2018 11:28 AM
    Wednesday, February 14, 2018 1:20 PM
  • Also I knew it reminded me of something... there is already a MP for ntp time drift monitoring!

    https://gallery.technet.microsoft.com/SCOM-Management-Pack-to-bca30237

    Great find, just imported and works perfect. However, I'm going to continue to fix the script just in case they require the offset directly from NTP and not w32tm. I'll report back.


    • Edited by KLIFTIN Thursday, February 15, 2018 8:39 AM
    Thursday, February 15, 2018 8:36 AM
  • I would personally avoid as much as possible to author a monitor that rely on a non-standard powershell module that is not already available on all the servers you want to monitor.

    If you really want to continue developping your own monitoring, it may be a better idea to find a way to do it using only native cmdlets/binaries like w32tm...

    Thursday, February 15, 2018 8:47 AM
  • I thought the NTP script reported offset between DCs and NTP server, not just server to dc. Perhaps I was mistaken. That was one of our requirements to test against the NTP server itself using NTP protocol, not W32tm or ICMP.
    Thursday, February 15, 2018 4:34 PM
  • You can check time drift between local computer and any ntp source using w32tm :

    w32tm.exe /monitor /computers:pool.ntp.org


    • Edited by CyrAz Thursday, February 15, 2018 4:41 PM
    • Marked as answer by KLIFTIN Friday, February 16, 2018 11:27 AM
    • Unmarked as answer by KLIFTIN Friday, February 16, 2018 11:27 AM
    Thursday, February 15, 2018 4:41 PM
  • You can check time drift between local computer and any ntp source using w32tm :

    w32tm.exe /monitor /computers:pool.ntp.org


    You have me convinced. Thanks again for the help with that.

    • Edited by KLIFTIN Friday, February 16, 2018 8:15 AM
    Thursday, February 15, 2018 6:24 PM
  • Hi All,

    How can we monitor the same for a linux servers

    We want to monitor if offset goes beyond some value

    Thanks

    Sunil

    Tuesday, July 31, 2018 5:55 PM
  • you will probably find this info on linux using ntpdate -d your.ntpserver.name 
    Tuesday, July 31, 2018 7:13 PM