|
-
May 16th, 2010, 08:55 AM
#1
Thread Starter
Frenzied Member
Need a few people to test something for me...
Hi guys!
Anyone out there who knows how to run WMI queries, will you please run a query on the Win32_Processor object and retrieve the L3CacheSize property and post it here.
I'm have a few issues with it and I want to know if its just me - it seems to be returning no result here despite the fact that I have a L3 Cache on my CPU. It's pretty strange and I'm trying to figure out if it's just me or not.
Thanks!
-
May 16th, 2010, 10:39 AM
#2
Re: Need a few people to test something for me...
Depends on what you mean by no result - I'm getting a 0, which is a result of sorts. Or did you mean you want a number greater than 0?
L2CacheSize: 6144
L2CacheSpeed:
L3CacheSize: 0
L3CacheSpeed: 0
LastErrorCode:
Code:
ManagementClass mc = new ManagementClass("Win32_Processor");
ManagementObjectCollection moc = mc.GetInstances();
foreach (ManagementObject mo in moc)
{
foreach (var p in mo.Properties)
{
Debug.WriteLine(p.Name + ": " + p.Value);
}
}
-
May 16th, 2010, 10:44 AM
#3
Thread Starter
Frenzied Member
Re: Need a few people to test something for me...
Seems it isn't just me then. Yes. I was looking for something other than 0.
This is pretty bizarre. It's showing a 0 rather than a null, which is what I would expect if the information could not be read. I'm unsure why this is happening but it seems it isn't just me then.
-
May 16th, 2010, 11:02 AM
#4
Re: Need a few people to test something for me...
Just remembered - you could just have a look in CPU-Z to see if it's able to read your Level 3 settings. I get a grayed out box for mine.
-
May 16th, 2010, 11:47 AM
#5
Thread Starter
Frenzied Member
Re: Need a few people to test something for me...
I can't even run CPU-Z - every time I do it drains 25% of my CPU runtime before eventually crashing its self.
-
May 21st, 2010, 06:10 PM
#6
Thread Starter
Frenzied Member
Re: Need a few people to test something for me...
After doing some further testing on the Win32_CacheMemory class I found out that it doesn't recognise it either!
Would you do me a favour and try running this query?
Code:
ManagementObjectCollection testResults = wmi.RunQuery("SELECT InstalledSize FROM Win32_CacheMemory");
System.Windows.MessageBox.Show(testResults.Count.ToString());
foreach (ManagementObject result in testResults)
{
System.Windows.MessageBox.Show(result["Level"].ToString() + " " + result["InstalledSize"].ToString());
}
Obviously you'll need to switch my runquery function for the regular one by the way.
For me, it doesn't find anything but more interestingly it breaks down when it hits a memory item without a level - something I'm pretty sure shouldn't happen.
Does anyone have any insight into what is going on here?
-
May 23rd, 2010, 03:16 PM
#7
Thread Starter
Frenzied Member
Re: Need a few people to test something for me...
If anyone else can test these issues for me - then you can help by reporting on this bug.
Cheers.
-
May 23rd, 2010, 04:40 PM
#8
Re: Need a few people to test something for me...
Ran this:
Code:
ManagementClass mc = new ManagementClass("Win32_CacheMemory");
ManagementObjectCollection moc = mc.GetInstances();
foreach (ManagementObject mo in moc)
{
foreach (var p in mo.Properties)
{
Debug.WriteLine(p.Name + ": " + p.Value);
}
}
Got:
InstalledSize: 32
LastErrorCode:
Level: 3
-
May 23rd, 2010, 04:42 PM
#9
Thread Starter
Frenzied Member
Re: Need a few people to test something for me...
By the looks of it that isn't correct either. Hmm. No matter. There is definatley something wrong here since when using the __cpuid and __cpuindex functions (from low level C++ and ASM) I was able to get this information so it clearly is there - it's just that WMI isn't reading it for whatever reason.
It is quite strange actually - I've never seen an issue like this before using WMI.
-
May 29th, 2010, 12:44 PM
#10
Re: Need a few people to test something for me...
 Originally Posted by sciguyryan
I've never seen an issue like this before using WMI.
I have and its precisely why I avoid using WMI completely now. I dont see any point in using a system for gathering information that cannot be relied on 100%.
An example that I remember from not that long ago was when I tried to use a WMI script that got the PC name, serial number and currently logged on user from all machines that were currently connected to the network. I found that for about 5% of them at least one of those values just came back as empty, even if it had managed to get some of the other values from that same PC.
-
May 29th, 2010, 12:59 PM
#11
Thread Starter
Frenzied Member
Re: Need a few people to test something for me...
I have since switched to using low level C++ calls to the __cpuid function where ever possible but it makes the code significantly more complex which I was trying to avoid...
Some of the stuff in WMI is indeed useful and as far as I have tested it is one of the only things that seems to break that I need so far. I have since reported it and hopefully MS will fix it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|