<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Windows ping subagent time resolution]]></title><description><![CDATA[<p dir="auto">I setup a Windows XP SP3 client with a ping.nsm SubAgent and added a *PING section with the target of two IP addresses.  It appears the timing resolution is not large enough, since the one IP address has an average and last values of 0, but other tools show it should be around around 3-5ms.  It seems to be rounding anything less than 20ms down to zero.</p>
<p dir="auto">The other IP address which is much farther away seems to be reporting valid values in the 260ms range.</p>
<p dir="auto">Is this a known limitation of the ping subagent on windows?</p>
]]></description><link>https://forum.netxms.org/topic/923/windows-ping-subagent-time-resolution</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 11:48:22 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/923.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 May 2010 17:08:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Windows ping subagent time resolution on Sun, 11 Jul 2010 01:14:08 GMT]]></title><description><![CDATA[<p dir="auto">Microsoft can promise all they want, but reality is sometimes different. <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">I couldn't find the msdn blog I was remembering, but I did find this kb article.  It appears they may have fixed a few things since this is considered retired now.<br />
<a href="http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q274323&amp;" rel="nofollow ugc">http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q274323&amp;</a></p>
<p dir="auto">I don't think they use the rdtsc counter in multi-core systems anymore, but they do still recommend to lock the timing thread to one processor since not all HAL implementations will give consistent readings between cores.  Closest thing my quick search returned is: <a href="http://msdn.microsoft.com/en-us/library/ee417693%28v=VS.85%29.aspx" rel="nofollow ugc">http://msdn.microsoft.com/en-us/library/ee417693(v=VS.85).aspx</a></p>
<p dir="auto">BTW, I DO appreciate your timing changes and keep up the good work!!!  I just wanted to warn you that some odd hardware/os combos will probably fail to measure time correctly...</p>
]]></description><link>https://forum.netxms.org/post/4318</link><guid isPermaLink="true">https://forum.netxms.org/post/4318</guid><dc:creator><![CDATA[kmradke]]></dc:creator><pubDate>Sun, 11 Jul 2010 01:14:08 GMT</pubDate></item><item><title><![CDATA[Reply to Windows ping subagent time resolution on Fri, 09 Jul 2010 10:09:27 GMT]]></title><description><![CDATA[<p dir="auto">Microsoft promises that frequency should not change between reboots <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /> (<a href="http://msdn.microsoft.com/en-us/library/ms644905%28VS.85%29.aspx" rel="nofollow ugc">http://msdn.microsoft.com/en-us/library/ms644905(VS.85).aspx</a>). I choose to use performance counter because timeGetTime has much bigger call cost - but I'm not sure that this really matters in our case. I could also build libnetxms.dll with timeGetTime variant to compare. Interestin also is that on my Windows 7 machine event GetSystemTimeAsFileTime, which was used before, gives 1ms accuracy.</p>
<p dir="auto">Best regards,<br />
Victor</p>
<p dir="auto">P.S. New libnetxms.dll included in 1.0.3 build, so if you upgrade agent, you will not need to download libnetxms.dll from here.</p>
]]></description><link>https://forum.netxms.org/post/4316</link><guid isPermaLink="true">https://forum.netxms.org/post/4316</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 09 Jul 2010 10:09:27 GMT</pubDate></item><item><title><![CDATA[Reply to Windows ping subagent time resolution on Fri, 09 Jul 2010 02:42:12 GMT]]></title><description><![CDATA[<p dir="auto">Haven't had time to test it yet, but QueryPerformanceCounter can have issues on machines with SpeedStep enabled.  (Since the frequency varies dynamically.)  I believe some AMD multi-core systems have problems too.  I suspect it will work for most people fine.  I hadn't noticed the original function was ms since a set epoch.  That could easily be simulated with an initial call to save the offset from the system start time.  However, my example would still roll over after 49 days anyway, which could cause problems as well.  Windows just sucks at telling high resolution time...</p>
]]></description><link>https://forum.netxms.org/post/4312</link><guid isPermaLink="true">https://forum.netxms.org/post/4312</guid><dc:creator><![CDATA[kmradke]]></dc:creator><pubDate>Fri, 09 Jul 2010 02:42:12 GMT</pubDate></item><item><title><![CDATA[Reply to Windows ping subagent time resolution on Fri, 02 Jul 2010 20:43:42 GMT]]></title><description><![CDATA[<p dir="auto">It takes a bit more time <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /> Updated libnetxms.dll can be downloaded from here: <a href="https://www.netxms.org/download/patches/006/libnetxms.dll" rel="nofollow ugc">https://www.netxms.org/download/patches/006/libnetxms.dll</a>. It now uses QueryPerformanceCounter for time interval measurement. You can replace existing libnetxms.dll with new one and test agent.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/4307</link><guid isPermaLink="true">https://forum.netxms.org/post/4307</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 02 Jul 2010 20:43:42 GMT</pubDate></item><item><title><![CDATA[Reply to Windows ping subagent time resolution on Thu, 01 Jul 2010 15:26:37 GMT]]></title><description><![CDATA[<p dir="auto">We cannot change GetCurrentTimeMs in that way, because it is supposed to return current time since epoch in milliseconds, and timeGetTime returns time since system start. We need to replace call to GetCurrentTimeMs with timeGetTime or QueryPerformanceCounter inside IcmpPing function. I'll create patched libnetxms.dll this evening and post it for testing.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/4306</link><guid isPermaLink="true">https://forum.netxms.org/post/4306</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 01 Jul 2010 15:26:37 GMT</pubDate></item><item><title><![CDATA[Reply to Windows ping subagent time resolution on Tue, 29 Jun 2010 17:49:21 GMT]]></title><description><![CDATA[<p dir="auto">Might be easiest just to use the multimedia timers and crank up the resolution to 1ms.<br />
Could possibly call timeBeginPeriod in some startup routine.  Not sure of the overhead or if it hurts to repeatedly call it like this.<br />
Might also need to include mmsystem.h if not already present through windows.h</p>
<p dir="auto">I don't have a functional netxms build system or else I would just try this myself.</p>
<p dir="auto">Something like this in tools.cpp:</p>
<pre><code>INT64 LIBNETXMS_EXPORTABLE GetCurrentTimeMs(void)
{
#ifdef _WIN32
  INT64 t;
  DWORD ms;
  timeBeginPeriod(1);
  t = (INT64)timeGetTime();
  timeEndPeriod(1);
#else
   struct timeval tv;
   INT64 t;

   gettimeofday(&amp;tv, NULL);
   t = (INT64)tv.tv_sec * 1000 + (INT64)(tv.tv_usec / 10000);
#endif

   return t;
}
</code></pre>
]]></description><link>https://forum.netxms.org/post/4303</link><guid isPermaLink="true">https://forum.netxms.org/post/4303</guid><dc:creator><![CDATA[kmradke]]></dc:creator><pubDate>Tue, 29 Jun 2010 17:49:21 GMT</pubDate></item><item><title><![CDATA[Reply to Windows ping subagent time resolution on Mon, 24 May 2010 20:22:10 GMT]]></title><description><![CDATA[<p dir="auto">Just check this - ping subagent uses GetSystemTimeAsFileTime to measure time intervals, which has resolution of 15-20ms. I'll try to change it to high resolution timer and post test subagent here.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/4224</link><guid isPermaLink="true">https://forum.netxms.org/post/4224</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 24 May 2010 20:22:10 GMT</pubDate></item></channel></rss>