Windows and Linux script to monitor NTP offset value

PowershellScriptNTP is a time synchronization protocol, which can be used to synchronize the system time from an external resource.

If you are a network, system or application administrator who managing a large number of servers and application environment, it is important that NTP is configured and running correctly. This is also a security concern that all servers in an application environment are running in same time with same CPU clock.

NTP offset value can be used for monitor the time differences between NTP server and client. I have complied Powershell and KornShell script to monitor NTP offset time and create alert if NTP offset value is larger than “60000”.


Script  Details:

  1. Get  System defined  NTP  Servers.
  2. Calculate NTP offset Value.
  3. Check if offset  is larger  than 60000 miliseconds.
  4. Send alert  to  HP  Operation Manager.


Windows Servers NTP Offset Monitor

Before Running:

  • Check Powershell version  on your server with  $PSVersionTable . PS version must be minimum 3.
  • Change  $path_ntp parameter  on script that where  you located your this script.
  • Alert rule  created for HP Operation Manager. If you need  change  it to your  as you wish.

Script Added  Githup Repository. You can get  it from this  link.

Linux NTP Offset Monitor

  • Change  Script_Path where you located script.


Follow me


I'm a System Engineer with extensive experience and administration skills and works for Interbank Card Center Of Turkey.I provide hardware and software support for the following Unix/Linux and Windows platforms.(Oracle Solaris,HP-UX, Linux, IBM-AIX, Windows Servers)
Follow me
facebooktwittergoogle_pluslinkedinby feather