Note that there are some explanatory texts on larger screens.

plurals
  1. POHow (and how often) are the database entries updated in WMI?
    text
    copied!<p>We have a requirement to design a monitoring application for our Windows client machines and I'm chasing up some information on the the WMI architecture. Our current plan is to use fairly simple VBScript scripts to periodically query the database, writing relevant information to flat files for later transfer to a central server (where all the heavy lifting of analysis and reporting already exists for our non-Windows machines.</p> <p>I've tried looking for an answer to this question on MSDN and the net at large, but all the articles seem particularly "fluffy" - lots of "how to use it" but little on "how it works internally".</p> <p>Take for example a VBScript segment like:</p> <pre><code>set wmi = getObject("winmgmts:\\.\root\cimv2") set itemCpu = wmi.get("Win32_PerfRawData_PerfOS_Processor.Name='_Total'") n = itemCpu.PercentProcessorTime </code></pre> <p>or:</p> <pre><code>set wmi = getObject("winmgmts:\\.\root\cimv2") set colMem = wmi.execQuery( "select AvailableKBytes from Win32_PerfRawData_PerfOS_Memory",,48) </code></pre> <p>Now, I understand that these goes out to the CIM database and retrieve the relevant entries, and I <em>think</em> there's a disconnect between the <em>collecting</em> of information into that database and the <em>extraction</em> of it.</p> <p>In other words, statistics are collected and written to the database by Windows regardless of whether anyone is requesting information from said database. My understanding can best be summed up as:</p> <pre><code>+------------+ req/ ======== | Monitoring | resp / \ stats +------------+ | Processes | &lt;-------&gt; &lt; Database &gt; &lt;-------- | Collectors | | | \ / +------------+ +------------+ ======== \_____________________________/ \_____________________________/ On-demand Always happening </code></pre> <p>But I'm interested in the process whereby the database is <em>populated,</em> in more depth. Things like:</p> <ul> <li>How can we tell how often, and under what circumstances, information is added to the database by the Windows "collectors"?</li> <li>Does the Windows kernel write process information on every task switch?</li> <li>Does it write memory information every second?</li> <li>Does it only update the database on demand (when a monitoring application requests information)?</li> </ul> <p>That's the sort of stuff I'm trying to find out.</p> <p>Does anyone have that sort of information, or links to technically-minded articles or whitepapers on the subject?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload