473,563 Members | 2,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ntp in python

I want to measure the packet delivery delays over various network
links. For this I need to synchronise the times of the sender and
receiver, either against NTP or eachother.

Unfortunately I won't necessarily have root priviledges to change the
PCs' clocks. So I'm looking for a way I can determine the offset and
simply correct my measurements from my Python code.

I doubt something like
http://www.nightsong.com/phr/python/setclock.py
would give me a resolution of less than 10ms - which is what I want.

Any Python module out there that uses a more sophisticated method?

btw I can do round-trip delivery and avoid the whole clock-mismatch
issue, but this would lose information on the network's asymmetry -
which would be really nice to have.

Aug 29 '06 #1
5 4266
Janto Dreijer wrote:
I want to measure the packet delivery delays over various network
links. For this I need to synchronise the times of the sender and
receiver, either against NTP or eachother.
Couldn't you just use NTP itself to get the delivery delay? You can read the
delay out from the ntpdc console using dmpeers, or lopeers in ntpq. You
could have two peers either side of the link and measure the delay from
NTP.

You may also be able to query remote ntp servers to get their delays to
their peers.

Jeremy

--
Jeremy Sanders
http://www.jeremysanders.net/
Aug 29 '06 #2
Hi,
I want to measure the packet delivery delays over various network
links. For this I need to synchronise the times of the sender and
receiver, either against NTP or eachother.
Maybe you can contact RIPE. They have test-boxes for exactly these kind of
tests. I know AMS-IX uses them to measure the quality of their switch
platform.

See http://www.ripe.net/projects/ttm/index.html

- Sander

Aug 29 '06 #3
Jeremy Sanders wrote:
Janto Dreijer wrote:
I want to measure the packet delivery delays over various network
links. For this I need to synchronise the times of the sender and
receiver, either against NTP or eachother.

Couldn't you just use NTP itself to get the delivery delay? You can read the
delay out from the ntpdc console using dmpeers, or lopeers in ntpq. You
could have two peers either side of the link and measure the delay from
NTP.

You may also be able to query remote ntp servers to get their delays to
their peers.
Unfortunately I don't think that would work for me. I need the delay of
a stream of packets. Not just a single delay number. More specifically:
I'm testing RTP (VoIP) packet speeds and would like to predict lag
(ignoring jitter...separa te measurement).

Aug 29 '06 #4
Janto Dreijer wrote:
Jeremy Sanders wrote:
Janto Dreijer wrote:
I want to measure the packet delivery delays over various network
links. For this I need to synchronise the times of the sender and
receiver, either against NTP or eachother.
Couldn't you just use NTP itself to get the delivery delay? You can read the
delay out from the ntpdc console using dmpeers, or lopeers in ntpq. You
could have two peers either side of the link and measure the delay from
NTP.

You may also be able to query remote ntp servers to get their delays to
their peers.

Unfortunately I don't think that would work for me. I need the delay of
a stream of packets. Not just a single delay number. More specifically:
I'm testing RTP (VoIP) packet speeds and would like to predict lag
(ignoring jitter...separa te measurement).
(replying to myself here)

More importantly, it looks like some of the network firewalls I'll be
testing though block the ports typically used by NTP...I hope I'm
wrong.

Maybe I'd be better off writing my own implementation that synchronises
the two pc clocks. Any hints? :-)

Aug 29 '06 #5
Janto Dreijer wrote:
Maybe I'd be better off writing my own implementation that synchronises
the two pc clocks. Any hints? :-)
I think you might read up on how ntp synchronises clocks (their website is
very thorough), and use their algorithm. It is supposed to be very robust
algorithm. I saw something about ntp on the twisted mailing list, so you
could ask there.

Jeremy

--
Jeremy Sanders
http://www.jeremysanders.net/
Aug 30 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.