By Default,Client Cache information is not collected by Configuration Manager.You should do some customizations to get it working.
This blog post talks about how to create Custom MOF file and import into SCCM as custom hardware inventory class which will be applied onto clients as policy to get the information from WMI .
Save the below code into file with file_name.mof.
[ SMS_Report (TRUE),
SMS_Group_Name ("SMS Advanced Client Cache"),
SMS_Class_ID ("SMS_ADVANCED_CLIENT_CACHE"),
Namespace ("\\\\\\\\.\\\\root\\\\ccm\\\\softmgmtagent") ]
class CacheConfig : SMS_Class_Template
{
[ SMS_Report (TRUE), key ]
String ConfigKey;
[ SMS_Report (TRUE) ]
Boolean InUse;
[ SMS_Report (TRUE) ]
String Location;
[ SMS_Report (TRUE) ]
UInt32 Size;
};
Note:Please Replace the Quotes (‘”) ,blog converts them to fancy.
Open Configmgr 2012 Console,Move onto Administration pane—>Client Settings ,you see Default Client settings.
Note :Don't try to do it on custom client hardware inventory settings which you have created ,If you do so,it will not work.
Below is error code what you get if you try to import to Custom hardware inventory settings.
“The following classes for which you are trying to import settings do not exist. Import the required class definitions and then try to import the settings again.”
Always import /Add the custom hardware inventory classes onto Default Client settings .These changes will be automatically flow into Custom client hardware inventory settings.
Click on Set Classes and then Click on Import
Select the MOF file that we created above.
Select what is required for you.
Monitor dataldr.log on the site server if these changes successfully processed or not ?
From above we conclude that,these changes are inserted into Database.
You can also verify from UI ,select what fields you required and what not .
From the SCCM client machine,you see the following changes when the hardware inventory schedule runs:
Inventoryagent.log
Below is the collection, you can create to know how man clients do not meet the required cache size.
select * from SMS_R_System inner join SMS_G_System_SMS_ADVANCED_CLIENT_CACHE on SMS_G_System_SMS_ADVANCED_CLIENT_CACHE.ResourceId = SMS_R_System.ResourceId where SMS_G_System_SMS_ADVANCED_CLIENT_CACHE.Size < 10240
Thanks to MOF Master Sherry for providing the MOF file.
16 Comments
Could you help me with SQL view for this
Hi,
You can get the SQL view from the dataldr.log. did you check it?
Thanks,
Eswar
Hello, is there anything else needed to do? I imported mof file, I can see class has been added, I can see view in database, no errors, but even I forced policy update and HW inventory on workstations, there are no data about cache size after one day.
Hi Pavel,
Did you look at inventoryagent.log to see if the inventory about the cache sent to site server ? you should see the info in the log something like cacheconfig etc.
Hi, thanks for reply. I checked few computers which sent HW inventory recently and there is nothing about collecting cache size in Inventoryagent.log. It looks like computers does not know that they should collect it.
I double checked Default client settings and see no problem in inventory classes which should be collected.
I'm not sure what happened, or if I made something I did not noticed, but it started to collect data now
It could be that, client did not send the inventory about cache so that might have got delayed.
Regards,
Eswar
May be that reason, but is strange. There is almost 1700 active machines in environment and after it collected first data (about two or three days after I set it) it was collecting data from about 200 - 300 computers per day.
Many thanks for the reporting, this is exactly what I was searching for. 🙂
One question; the cache size (in your example 10240) in the qurey is in MB, correct?!
Hi Basti,
Yes, that is in MB (10GB) but you can change however you want.
Regards,
Eswar
Thank you for Eswar. This is very useful. 🙂
Hi Danish,
You are welcome, glad it helped.
Thanks,
Eswar
Hi DeniSH,
You are welcome.
Thanks,
Eswar
Hi,
Can we have report for disk space usage on all servers in collection, Report should contain all size of folders on C drive excluding folder such as c:\program files c:\windows.
Did you try this link ? http://blog.configmgrftw.com/folder-size-inventory-using-configmgr/
Nice one, thanks 🙂