<?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[script a wmi query]]></title><description><![CDATA[<p dir="auto">i would like to monitor what is going on in my IIS server in term of memory.</p>
<p dir="auto">IIS works with different worker process each of them is linked to an application pool. I found on the internet how to query the counter i want with a WMI query.<br />
The problem is that i dont have only one WMI query to get what i want :</p>
<p dir="auto">            <br />
    select VirtualBytes, PrivateBytes from Win32_PerfFormattedData_PerfProc_Process where IDProcess = XX<br />
        =&gt; this query allows to get the virtual bytes and the private bytes<br />
    the problem is i can not identify the process so i need another query to do that<br />
        <br />
    select ProcessId from Win32_Process where commandline like "%myApplicationPoolName%"<br />
        =&gt; this query allows to identify the application pool and get the pid<br />
        <br />
As the WMI query does not enable to make a inner join, the only way is to program that in VBScript or in other programming language.<br />
Is it possible with NetXMS launch a script periodically and get the result to trace in a graph ?<br />
or maybe there is a different way to get what i want ?</p>
]]></description><link>https://forum.netxms.org/topic/1095/script-a-wmi-query</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:36:15 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/1095.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Jan 2011 11:32:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to script a wmi query on Wed, 09 Mar 2011 15:29:39 GMT]]></title><description><![CDATA[<p dir="auto">I figured this out.  I placed the externalparameter line below the *PING line in the config.  Moving it above this line and it works perfectly.</p>
<p dir="auto">Love this app btw, great work.</p>
]]></description><link>https://forum.netxms.org/post/5272</link><guid isPermaLink="true">https://forum.netxms.org/post/5272</guid><dc:creator><![CDATA[Rabid]]></dc:creator><pubDate>Wed, 09 Mar 2011 15:29:39 GMT</pubDate></item><item><title><![CDATA[Reply to script a wmi query on Tue, 08 Mar 2011 20:25:44 GMT]]></title><description><![CDATA[<p dir="auto">I did that.  Checked via the same method posted above and still nothing new shows up.  It should show up under Supported agent parameters as MyAVCheck correct?  If so, then nothing is showing up.  Even allowing some time to pass by.  Do I need to add a subagent or anything along those lines?  Also, the vbs file and the config file was edited on the machine I am monitoring.  Nothing needs to be added to the machine that acts as the server correct?</p>
]]></description><link>https://forum.netxms.org/post/5270</link><guid isPermaLink="true">https://forum.netxms.org/post/5270</guid><dc:creator><![CDATA[Rabid]]></dc:creator><pubDate>Tue, 08 Mar 2011 20:25:44 GMT</pubDate></item><item><title><![CDATA[Reply to script a wmi query on Tue, 08 Mar 2011 19:43:45 GMT]]></title><description><![CDATA[<p dir="auto">List of parameters supported by agent updated during configuration poll. If you wish to see new parameters in the list immediately, you should force configuration poll on the node (by selecting Poll -&gt; Configuration from node's context menu).</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/5269</link><guid isPermaLink="true">https://forum.netxms.org/post/5269</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 08 Mar 2011 19:43:45 GMT</pubDate></item><item><title><![CDATA[Reply to script a wmi query on Tue, 08 Mar 2011 19:35:59 GMT]]></title><description><![CDATA[<p dir="auto">I have created a folder on one of my nodes c:\myscripts.  On the node that i want to run this script on I right-clicked and hit edit agent's config.  I added the following line:</p>
<p dir="auto">ExternalParameter = MyAVCheck:c:\windows\system32\cscript.exe //Nologo "C:\myscripts\avscript.vbs"</p>
<p dir="auto">I hit save and apply.  Also restarted service on the node I was working with.</p>
<p dir="auto">I have ran</p>
<p dir="auto">c:\windows\system32\cscript.exe //Nologo "C:\myscripts\avscript.vbs"</p>
<p dir="auto">from a command prompt and it returns the correct value.</p>
<p dir="auto">I then right-click my node and select Data Collection.  Right-click again and select New.  Hit the select button under the Data/Parameter section with NetXMS agent selected in the dropdown box.  I do not see the MyAVCheck.  How do i start collecting the value from this script?</p>
<p dir="auto">I am using 1.0.10 console and 1.0.10 agent for windows.</p>
]]></description><link>https://forum.netxms.org/post/5268</link><guid isPermaLink="true">https://forum.netxms.org/post/5268</guid><dc:creator><![CDATA[Rabid]]></dc:creator><pubDate>Tue, 08 Mar 2011 19:35:59 GMT</pubDate></item><item><title><![CDATA[Reply to script a wmi query on Mon, 14 Feb 2011 13:40:55 GMT]]></title><description><![CDATA[<p dir="auto">wow<br />
thanks a milion<br />
it helps me a lot.<br />
miniseb</p>
]]></description><link>https://forum.netxms.org/post/5136</link><guid isPermaLink="true">https://forum.netxms.org/post/5136</guid><dc:creator><![CDATA[miniseb]]></dc:creator><pubDate>Mon, 14 Feb 2011 13:40:55 GMT</pubDate></item><item><title><![CDATA[Reply to script a wmi query on Tue, 08 Feb 2011 20:47:07 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">jsut check it on my machine, and it looks like cscript suppresses output of WScript.Echo in batch mode, so agent cannot get the result. Changing</p>
<p dir="auto">ExternalParameter = MyParameter:c:\windows\system32\cscript.exe //B //Nologo "c:\MyScript\myscript.vbs"</p>
<p dir="auto">to</p>
<p dir="auto">ExternalParameter = MyParameter:c:\windows\system32\cscript.exe //Nologo "c:\MyScript\myscript.vbs"</p>
<p dir="auto">gives correct result for MyParameter.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/5109</link><guid isPermaLink="true">https://forum.netxms.org/post/5109</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 08 Feb 2011 20:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to script a wmi query on Tue, 08 Feb 2011 13:00:16 GMT]]></title><description><![CDATA[<p dir="auto">hello</p>
<p dir="auto">any body have an idea?<br />
miniseb</p>
]]></description><link>https://forum.netxms.org/post/5106</link><guid isPermaLink="true">https://forum.netxms.org/post/5106</guid><dc:creator><![CDATA[miniseb]]></dc:creator><pubDate>Tue, 08 Feb 2011 13:00:16 GMT</pubDate></item><item><title><![CDATA[Reply to script a wmi query on Thu, 27 Jan 2011 08:08:20 GMT]]></title><description><![CDATA[<p dir="auto">I am struggling to make that working:</p>
<p dir="auto">I created a vbscript :<br />
    Dim test<br />
    test = 10<br />
    WScript.Echo test</p>
<p dir="auto">I insert the following lines in nxagentd.conf :<br />
ExternalParameter = MyParameter:c:\windows\system32\cscript.exe //B //Nologo "c:\MyScript\myscript.vbs"</p>
<p dir="auto">In the data collection, a new item is shown named "MyParameter". I select it so i see MyParameter in my data collection. The value of this data collection never updates.<br />
thanks for your help<br />
miniseb</p>
]]></description><link>https://forum.netxms.org/post/5067</link><guid isPermaLink="true">https://forum.netxms.org/post/5067</guid><dc:creator><![CDATA[miniseb]]></dc:creator><pubDate>Thu, 27 Jan 2011 08:08:20 GMT</pubDate></item><item><title><![CDATA[Reply to script a wmi query on Mon, 03 Jan 2011 20:22:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">You can define new parameters in agent implemented by external script, and then collect these parameters as usual. You can use any external program as parameter handler, and first line of the command's output will be considered as parameter's value. For example, if you have script <strong>myscript.vbs</strong> and wish to define new parameter <strong>AppUsage</strong>, you can add the following line to nxagentd.conf:</p>
<p dir="auto">ExternalParameter = AppUsage:cscript.exe //B //Nologo myscript.vbs</p>
<p dir="auto">Restart agent, and you will have new parameter <strong>AppUsage</strong> available for collection.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/4941</link><guid isPermaLink="true">https://forum.netxms.org/post/4941</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 03 Jan 2011 20:22:32 GMT</pubDate></item></channel></rss>