I was wondering if anyone has any ideas on plotting a remote systems time drift.
By 'time drift ', what I mean is that we have an ntp server, and our servers all get their time from this server. Now what I want is a graph that polts the difference between the time on each host and the time on a control system (I was thinking I'd just cron an ntpupdate on the cacti box every 5 minutes).
So I guess, what I'd be wanting is basically just the best way to grab the time from a remote box, and then I could just do a simple subtraction.
I was hoping there was an option for ntpq to do this, but there doesn't appear to.
Obviously, I'm quite the SNMP n00b, so any help is appreciated.
Plotting Time Drift?
Moderators: Developers, Moderators
Perhaps if I knew why you want to do this measurement / graph I would understand your question better.
What exactly would this acomplish?
I am a graphing freak, so I am not opposed to graphing things like this!
I can't figure out what purpose this would serve.
With NTP functioning correctly, I wouldn't image the deviation measurements would be very meaningful graphed out.
Were you thinking of using this to determine if NTP was working ok?
Or more of detecting Real Time Clock / CMOS battery issues on hosts?
Be specific and I may be able to whip up a quick perl script for what you need.
What exactly would this acomplish?
I am a graphing freak, so I am not opposed to graphing things like this!
I can't figure out what purpose this would serve.
With NTP functioning correctly, I wouldn't image the deviation measurements would be very meaningful graphed out.
Were you thinking of using this to determine if NTP was working ok?
Or more of detecting Real Time Clock / CMOS battery issues on hosts?
Be specific and I may be able to whip up a quick perl script for what you need.
Thank you,
Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
Well on a basic level I was wanting to graph the differance between one system and the next I guess. I was thinking it'd be nice to see a graph which plotted on the vertical axis, the difference in milliseconds between the two.
Basically yes, as a graph to see wheher ntp is running as it should on each host I guess. Ideally the graph would be at zero and if something starts to show up, you'd know to investigate.
However thinking about it more, I could also add it to Nagios instead, just have a warning and critical level by which to alarm. Also, you may be quite right in it not being very useful, and having useless graphs does just become a clutter. I think I'll aim to get something like this going and then assess whether it is necessary to keep it.
Basically yes, as a graph to see wheher ntp is running as it should on each host I guess. Ideally the graph would be at zero and if something starts to show up, you'd know to investigate.
However thinking about it more, I could also add it to Nagios instead, just have a warning and critical level by which to alarm. Also, you may be quite right in it not being very useful, and having useless graphs does just become a clutter. I think I'll aim to get something like this going and then assess whether it is necessary to keep it.
- TheWitness
- Developer
- Posts: 17053
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Sounds like an rsh/ssh Data Input Method. It should be a no brainer.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Plotting Time Drift
You should be able to use a command like;
[quote]
ntpdate -q NTPSERVERNAME | grep -E "^server" | cut d, -f3 | cut -d" " -f3
[/quote]
...to obtain the current offset.
Note this runs ntpdate in query mode only, it will not modify the current system clock. Of course as TheWitness points out this command would be run on the remote host via RSH/SSH.
[quote]
ntpdate -q NTPSERVERNAME | grep -E "^server" | cut d, -f3 | cut -d" " -f3
[/quote]
...to obtain the current offset.
Note this runs ntpdate in query mode only, it will not modify the current system clock. Of course as TheWitness points out this command would be run on the remote host via RSH/SSH.
Who is online
Users browsing this forum: No registered users and 0 guests