<?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[SNMP free memory transform script]]></title><description><![CDATA[<p dir="auto">I have been working on a SNMP Free memory % transform script and I have found few examples that I can't get to work and I am not sure what I am doing wrong.</p>
<p dir="auto">I have created a DCI parameter for total memory for the device, and another DCI for the free % transform as shown here.<br />
memTotalReal, OID parameter - .1.3.6.1.4.1.2021.4.5.0<br />
Memory Free %, OID parameter - .1.3.6.1.4.1.2021.4.6.0</p>
<p dir="auto">I get the correct value for the Total Memory DCI, and on the second DCI for free % I apply this transform script:</p>
<p dir="auto">sub main()<br />
{<br />
   total = GetDCIValue($node, FindDCIByName($node, "memTotalReal"));<br />
 <br />
   return $1 / total * 100;<br />
}</p>
<p dir="auto">However, I only get the value of the DCI SNMP poll as if I didn't do any tranform.  So it does not seem to be returning the correct value.</p>
<p dir="auto">Can anyone tell me what I am doing wrong?</p>
<p dir="auto">netxms 2.0M4</p>
]]></description><link>https://forum.netxms.org/topic/3858/snmp-free-memory-transform-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:15:19 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3858.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Jul 2015 16:15:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SNMP free memory transform script on Wed, 01 Jul 2015 17:38:47 GMT]]></title><description><![CDATA[<p dir="auto">Thank you tomaskir, I replaced "FindDCIByName" with "FindDCIByDescription" and that did the trick.</p>
]]></description><link>https://forum.netxms.org/post/17218</link><guid isPermaLink="true">https://forum.netxms.org/post/17218</guid><dc:creator><![CDATA[curruscanis]]></dc:creator><pubDate>Wed, 01 Jul 2015 17:38:47 GMT</pubDate></item><item><title><![CDATA[Reply to SNMP free memory transform script on Wed, 01 Jul 2015 16:46:38 GMT]]></title><description><![CDATA[<p dir="auto">The function you want to use is probably <a href="https://wiki.netxms.org/wiki/NXSL:FindDCIByDescription" rel="nofollow ugc">FindDCIByDescription</a> and then <a href="https://wiki.netxms.org/wiki/NXSL:GetDCIValue" rel="nofollow ugc">GetDCIValue</a>.</p>
<p dir="auto">Or just use <a href="https://wiki.netxms.org/wiki/NXSL:GetDCIValueByDescription" rel="nofollow ugc">GetDCIValueByDescription</a><img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://forum.netxms.org/post/17217</link><guid isPermaLink="true">https://forum.netxms.org/post/17217</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Wed, 01 Jul 2015 16:46:38 GMT</pubDate></item></channel></rss>