Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NTP Plugin
#2
Hello AusAl,

The open NTP plugin is quite simple and requires no extra configuration, just empty execution. It gets env variables, like this:

# Info about ntp actual sync source - all retrieved with one query, later it's going to be appropiately parsed
NTP_INFO=`ntpq -p | grep "*"`


# Hostname of syncing source
NTP_HOST=`echo "$NTP_INFO" | awk '{print $2}'`
# Stratum of syncing source
NTP_STRATUM=`echo "$NTP_INFO" | awk '{print $3}'`
# Roundtrip  of syncing source
NTP_ROUNDTRIP=`echo "$NTP_INFO" | awk '{print $8}'`
# Offset of syncing source
NTP_OFFSET=`echo "$NTP_INFO" | awk '{print $9}'`
# Jitter of syncing source
NTP_JITTER=`echo "$NTP_INFO" | awk '{print $10}'`


So if those variables are not set, it won't display info.
You can edit easily this plugin to use the information obtained by the command "ntpq -p" instead. Take a look at the plugin's code.

Kind regards,
Antonio.
 Reply
Messages In This Thread
NTP Plugin - by AusAl - 02-22-2016, 02:58 AM
Re: NTP Plugin - by antonio - 03-17-2016, 10:57 AM


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes