Results 1 to 11 of 11

Thread: Need a few people to test something for me...

  1. #1

    Thread Starter
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    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!
    My Blog.

    Ryan Jones.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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);
                    }
    
                }

  3. #3

    Thread Starter
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    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.
    My Blog.

    Ryan Jones.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  5. #5

    Thread Starter
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    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.
    My Blog.

    Ryan Jones.

  6. #6

    Thread Starter
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    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?
    My Blog.

    Ryan Jones.

  7. #7

    Thread Starter
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    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.
    My Blog.

    Ryan Jones.

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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

  9. #9

    Thread Starter
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    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.
    My Blog.

    Ryan Jones.

  10. #10
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Need a few people to test something for me...

    Quote Originally Posted by sciguyryan View Post
    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.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  11. #11

    Thread Starter
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    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.
    My Blog.

    Ryan Jones.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width