[Closed] Get system information
I know about the sysInfo methods in MaxScript, as well as “IViewportShadingMgr.ReviewGPUDiagnostics()” and “getD3DMeshAllocated”/“getD3DMeshAllocatedFaces”, but are there also methods available with dotNet that can give me more information about a user’s machine?
OS
CPU Cores and speed
Total RAM
Video Card
Total Video RAM
Free Video RAM (I realize you can only get an approximation)
etc.
I’m trying to get a snapshot of the user’s machine when a crash occurs that will help me in debugging. It’s especially hard to tell what’s going on with the video memory at any point in time. What do you guys use to debug the dreaded “Unknown System Exception”, especially if it’s something that seems to be graphics related?
A large number of Hardware info can be read from the Registry.
MAXScript provides a registry struct with suitable methods…
For example:
(
registry.openKey HKEY_LOCAL_MACHINE "Hardware" accessRights:#readOnly key:&key1
registry.openKey key1 "DESCRIPTION" accessRights:#readOnly key:&key2
registry.openKey key2 "System" accessRights:#readOnly key:&key3
registry.openKey key3 "CentralProcessor" accessRights:#readOnly key:&key4
registry.queryInfoKey key4 numSubKeys:&numSubKeys numValues:&numValues
format "Number Of CPUs: %
" numSubKeys
for i = 1 to numSubKeys do
(
registry.getSubKeyName key4 i name:&thename
registry.openKey key4 thename accessRights:#readOnly key:&key5
registry.queryInfoKey key5 numSubKeys:&numSubKeys2 numValues:&numValues
for j = 1 to numValues do
(
registry.getValueName key5 j name:&theValName
registry.queryValue key5 theValName type:&theType value:&theVal
if theVal != undefined do format "% = %
" theValName theVal
)
)
)
Output:
Number Of CPUs: 8
Identifier = EM64T Family 6 Model 23 Stepping 6
ProcessorNameString = Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
VendorIdentifier = GenuineIntel
FeatureSet = 536952830
~MHz = 2494
Update Status = 2
Platform ID = 64
Identifier = EM64T Family 6 Model 23 Stepping 6
ProcessorNameString = Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
VendorIdentifier = GenuineIntel
FeatureSet = 536952830
~MHz = 2494
Update Status = 2
Platform ID = 64
Identifier = EM64T Family 6 Model 23 Stepping 6
ProcessorNameString = Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
VendorIdentifier = GenuineIntel
FeatureSet = 536952830
~MHz = 2494
Update Status = 2
Platform ID = 64
Identifier = EM64T Family 6 Model 23 Stepping 6
ProcessorNameString = Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
VendorIdentifier = GenuineIntel
FeatureSet = 536952830
~MHz = 2494
Update Status = 2
Platform ID = 64
Identifier = EM64T Family 6 Model 23 Stepping 6
ProcessorNameString = Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
VendorIdentifier = GenuineIntel
FeatureSet = 536952830
~MHz = 2494
Update Status = 2
Platform ID = 64
Identifier = EM64T Family 6 Model 23 Stepping 6
ProcessorNameString = Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
VendorIdentifier = GenuineIntel
FeatureSet = 536952830
~MHz = 2494
Update Status = 2
Platform ID = 64
Identifier = EM64T Family 6 Model 23 Stepping 6
ProcessorNameString = Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
VendorIdentifier = GenuineIntel
FeatureSet = 536952830
~MHz = 2494
Update Status = 2
Platform ID = 64
Identifier = EM64T Family 6 Model 23 Stepping 6
ProcessorNameString = Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
VendorIdentifier = GenuineIntel
FeatureSet = 536952830
~MHz = 2494
Update Status = 2
Platform ID = 64
OK