<?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[Using functions in Transformation Scripts]]></title><description><![CDATA[<p dir="auto">Hey,</p>
<p dir="auto">Is it possible to use functions in transformation scripts? What I'm trying to do is get the load average over the processor count.</p>
<p dir="auto">So I would assume something along the lines of</p>
<p dir="auto">sub main()<br />
{<br />
   return ($1 / System.CPU.Count());<br />
}</p>
<p dir="auto">Is this possible and if so what am I doing wrong? <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">Thanks !!</p>
]]></description><link>https://forum.netxms.org/topic/2646/using-functions-in-transformation-scripts</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 11:41:52 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2646.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Oct 2013 21:14:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using functions in Transformation Scripts on Fri, 04 Oct 2013 13:46:43 GMT]]></title><description><![CDATA[<p dir="auto">Perfect thanks!</p>
]]></description><link>https://forum.netxms.org/post/11461</link><guid isPermaLink="true">https://forum.netxms.org/post/11461</guid><dc:creator><![CDATA[mitchellj]]></dc:creator><pubDate>Fri, 04 Oct 2013 13:46:43 GMT</pubDate></item><item><title><![CDATA[Reply to Using functions in Transformation Scripts on Fri, 04 Oct 2013 08:38:20 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">You can create another DCI for System.CPU.Count parameter and read it's value in transformation script by calling GetDCIValueByName($node, "System.CPU.Count"). Full script could looks like</p>
<pre><code>return $1 / GetDCIValueByName($node, "System.CPU.Count");
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/11455</link><guid isPermaLink="true">https://forum.netxms.org/post/11455</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 04 Oct 2013 08:38:20 GMT</pubDate></item></channel></rss>