<?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[GetSumDCIValue and 64bits integer]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">As per subject, I have a problem with the GetSumDCIValue when the result is greater than a 32bit integer.<br />
This is my transformation:</p>
<pre><code>return int64(GetSumDCIValue($node, FindDCIByDescription($node, "WAN: delta in (bytes)"), time()-86400, time()));
</code></pre>
<p dir="auto">It returns 0 when the result cannot be handled by a 32 bits integer.</p>
<p dir="auto">I have another version of that DCI that uses a different approach to do the same computations and it works properly:</p>
<pre><code>last = int64(GetCustomAttribute($node, "WANCumulativeIn"));
if (last == null)
	last = 0;
SetCustomAttribute($node, "WANCumulativeIn", 0);
return last;
</code></pre>
<p dir="auto">The data type assigned to both DCIs is "Unsigned Integer 64 bit" (NB in the last example the custom attribute is updated by another DCI).</p>
<p dir="auto">Any hints?</p>
<p dir="auto">Best regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/topic/3147/getsumdcivalue-and-64bits-integer</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 15:13:17 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3147.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 May 2014 09:29:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetSumDCIValue and 64bits integer on Thu, 12 Jun 2014 21:13:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/14153">GetSumDCIValue and 64bits integer</a>:</p>
<blockquote>
<p dir="auto">Hi!</p>
<p dir="auto">I'm finally built an intermediate release. It is available here: <a href="https://www.netxms.org/download/1.2.15-M1/" rel="nofollow ugc">https://www.netxms.org/download/1.2.15-M1/</a>.</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto">Is it possible to have the WebUI? You changed the protocol and the previous version is no more able to connect.</p>
<p dir="auto">Best regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/14165</link><guid isPermaLink="true">https://forum.netxms.org/post/14165</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Thu, 12 Jun 2014 21:13:53 GMT</pubDate></item><item><title><![CDATA[Reply to GetSumDCIValue and 64bits integer on Thu, 12 Jun 2014 19:36:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/14153">GetSumDCIValue and 64bits integer</a>:</p>
<blockquote>
<p dir="auto">Hi!</p>
<p dir="auto">I'm finally built an intermediate release. It is available here: <a href="https://www.netxms.org/download/1.2.15-M1/" rel="nofollow ugc">https://www.netxms.org/download/1.2.15-M1/</a>.</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto">Thank you very much for your effort, I'm downloading it, I plan to install it tonight.</p>
<p dir="auto">Best regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/14154</link><guid isPermaLink="true">https://forum.netxms.org/post/14154</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Thu, 12 Jun 2014 19:36:30 GMT</pubDate></item><item><title><![CDATA[Reply to GetSumDCIValue and 64bits integer on Thu, 12 Jun 2014 19:27:42 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I'm finally built an intermediate release. It is available here: <a href="https://www.netxms.org/download/1.2.15-M1/" rel="nofollow ugc">https://www.netxms.org/download/1.2.15-M1/</a>.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/14153</link><guid isPermaLink="true">https://forum.netxms.org/post/14153</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 12 Jun 2014 19:27:42 GMT</pubDate></item><item><title><![CDATA[Reply to GetSumDCIValue and 64bits integer on Tue, 03 Jun 2014 10:16:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/14042">GetSumDCIValue and 64bits integer</a>:</p>
<blockquote>
<p dir="auto">I've fixed it. PLease let me know if you need intermediate server build with this fix.</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto">It could be nice to have it, I'm using the x64 Windows version.</p>
<p dir="auto">Best regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/14048</link><guid isPermaLink="true">https://forum.netxms.org/post/14048</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Tue, 03 Jun 2014 10:16:58 GMT</pubDate></item><item><title><![CDATA[Reply to GetSumDCIValue and 64bits integer on Mon, 02 Jun 2014 21:27:58 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Actually there is an error in query used in function. Query looks like</p>
<p dir="auto">SELECT max(coalesce(cast(idata_value as float),0)) FROM idata_%u<br />
WHERE item_id=? AND (idata_timestamp BETWEEN ? AND ?) AND isnumeric(idata_value)</p>
<p dir="auto">but isnumeric returns int, not boolean, so it should be</p>
<p dir="auto">isnumeric(idata_value)=1</p>
<p dir="auto">I've fixed it. PLease let me know if you need intermediate server build with this fix.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/14042</link><guid isPermaLink="true">https://forum.netxms.org/post/14042</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 02 Jun 2014 21:27:58 GMT</pubDate></item><item><title><![CDATA[Reply to GetSumDCIValue and 64bits integer on Wed, 28 May 2014 14:43:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/13853">GetSumDCIValue and 64bits integer</a>:</p>
<blockquote>
<p dir="auto">Yes, that change already applied - so after upgrade to 1.2.14 you'll get this problem fixed as well.</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto">Is there a reason to get always null in return from this function:</p>
<p dir="auto">GetMaxDCIValue($node, $dci-&gt;id, time()-86400, time());</p>
<p dir="auto">I tried to run manually the query (as per the SQL syntax in this thread) and it works fine, but I'm not able to have the function working in my transformation script.</p>
<p dir="auto">Best regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/14010</link><guid isPermaLink="true">https://forum.netxms.org/post/14010</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Wed, 28 May 2014 14:43:03 GMT</pubDate></item><item><title><![CDATA[Reply to GetSumDCIValue and 64bits integer on Thu, 08 May 2014 15:26:55 GMT]]></title><description><![CDATA[<p dir="auto">Yes, that change already applied - so after upgrade to 1.2.14 you'll get this problem fixed as well.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13853</link><guid isPermaLink="true">https://forum.netxms.org/post/13853</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 08 May 2014 15:26:55 GMT</pubDate></item><item><title><![CDATA[Reply to GetSumDCIValue and 64bits integer on Thu, 08 May 2014 15:25:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/13851">GetSumDCIValue and 64bits integer</a>:</p>
<blockquote>
<p dir="auto">Hi!</p>
<p dir="auto">Could you check what is returned by underlying SQL query? Implementation of this function tries to parse value read from database as double, so there should be no limitation on 32bit integer size.</p>
<p dir="auto">Actual query is</p>
<p dir="auto">SELECT avg(coalesce(idata_value,0)) FROM idata_&lt;node_id_here&gt; WHERE item_id=&lt;dci_id_here&gt; AND (idata_timestamp BETWEEN &lt;time1&gt; AND &lt;time2&gt;);</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto">I get &quot;Arithmetic overflow error converting expression to data type int&quot;. I propose to apply the same suggestion as per this thread:</p>
<p dir="auto"><a href="https://www.netxms.org/forum/configuration/getxxxdcivalue-(avgmaxmin)-fails-on-floating-numbers/msg13724/#msg13724" rel="nofollow ugc">https://www.netxms.org/forum/configuration/getxxxdcivalue-(avgmaxmin)-fails-on-floating-numbers/msg13724/#msg13724</a></p>
<p dir="auto">adding</p>
<pre><code>cast(idata_value as float),0)
</code></pre>
<p dir="auto">inside the coalesce function.</p>
<p dir="auto">Best regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/13852</link><guid isPermaLink="true">https://forum.netxms.org/post/13852</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Thu, 08 May 2014 15:25:42 GMT</pubDate></item><item><title><![CDATA[Reply to GetSumDCIValue and 64bits integer on Thu, 08 May 2014 14:38:33 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Could you check what is returned by underlying SQL query? Implementation of this function tries to parse value read from database as double, so there should be no limitation on 32bit integer size.</p>
<p dir="auto">Actual query is</p>
<p dir="auto">SELECT avg(coalesce(idata_value,0)) FROM idata_&lt;node_id_here&gt; WHERE item_id=&lt;dci_id_here&gt; AND (idata_timestamp BETWEEN &lt;time1&gt; AND &lt;time2&gt;);</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13851</link><guid isPermaLink="true">https://forum.netxms.org/post/13851</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 08 May 2014 14:38:33 GMT</pubDate></item></channel></rss>