WMI Win32_ Script Objects

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

WMI Win32_ Script Objects // Scriptorium

1  |  

Post by early // Sep 28, 2008, 5:51am

early
Total Posts: 46
Network monitor/System monitor


I continue to drill down in the design of the Network monitor. Since my network is primarily Windows machines, I can use Windows methods to interrogate remote servers and workstations. The starting point for that is to examine the local machine, see what data is available and how interesting it is. And the starting point for that is to write some low-level scripts to access high-end Windows instrumentation functions.


Here are a handful of script objects to expose some Windows information to trueSpace.


Each Win32_ class retrieves some information about the running Windows system. Since these are WMI functions, we could also feed the name or address of a remote system. The versions posted here are set up for your local machine only. Also, the Win32_ classes return an array of values, and I may not have handled multiple instances (ie, CPUs) the way you would prefer. Please post back any

corrected versions of the scripts.


The scripts do not expose all of the returned counter values to trueSpace, only data I consider potentially interesting. The standard is 'reasonably complete', not 'complete'.


These scripts were based in part on Wigand's "Some Useful Functions"

http://forums1.caligari.com/truespace/showthread.php?t=4221


Also invaluable was "Scriptomatic Version 2.0 by The Microsoft Scripting Guys"

http://www.microsoft.com/technet/scriptcenter/tools/wmimatic.mspx

Worth checking out for the humorous documentation, if nothing else. It would be nice if version 3 would output the XML for an importable Rosetta script... :)


Technical details of the Win32_ classes and the values returned can be found at MSDN:

http://msdn.microsoft.com/en-us/library/aa394271(VS.85).aspx





The attached zip file includes:

Win32_LogicalMemoryConfiguration.RsObj

Win32_OperatingSystem.RsObj

Win32_PagefileUsage.RsObj

Win32_PerfFormattedData_PerfOS_Memory.RsObj

Win32_PerfFormattedData_PerfOS_Processor.RsObj

Win32_PhysicalMemory.RsObj

Win32_Processor.RsObj

Post by frootee // Sep 28, 2008, 6:51am

frootee
Total Posts: 2667
pic
Wow early. I'm impressed! :D


This is some seriously cool stuff.


Froo
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn