In Zen 10 their is a built in report for memory upgrades that will report how much memory a system has, how large the memory modules currently installed are and how many free memory banks are available in a system. Is this possible to reproduce with a KBOX report? If so, any thoughts on a query to retrieve this info?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

1
The KBOX only allows you to report on total system memory - it doesn't detect each individual module's size. It would require a fairly simple query that should even be possible using the Report wizard. You could report on memory from all machines or only machines with a specific amount or range of RAM (i.e. machines with less than 1GB).
Answered 11/24/2009 by: airwolf
Tenth Degree Black Belt

Please log in to comment
1
The KBOX doesn't currently collect slots and info about the memory in them (it will in the next release), but you can create custom fields that will do this using a script to pull the info from WMI. For a quick example to get you going, create a file with the vbscript at the bottom of this post, and call it ram_slots.vbs.

Next, create a Custom Software Inventory item by going to Inventory->Software, Choose Action... and choose Add New Item. Give it a name, that will be the name of the custom data field in inventory. Highlight all of the Windows OS to determine which machines will have this custom field. Next, paste this into the custom inventory rule
ShellCommandTextReturn(c:\windows\system32\cscript.exe "//NoLogo" "c:\program files\KACE\scripts\ram_slots.vbs"). Next, click on the browse button to find your ram_slots.vbs file and attach it to the custom software item. This will let us create a FileSync to put the script into c:\program files\KACE\scripts. The software item should look roughly like the picture below. Finally, click Save.

Now, go to Deployment->FileSynchronization and Choose Action...Add New Item. Pick your Custom Data field from the list to choose the payload and specify the directory to be c:\program files\KACE\scripts\. Pick the labels or machines to whom you want to push the vbs file (if you check all computers, it will be filtered by the OS's you chose in the Software Inventory item, just like Managed Installs). When the screen looks roughly like the picture below, click Save.

You're ready to go. Let some machines check in twice, first to get the script there, and then to run the custom inventory script once the vbs is there, and you should now have a Custom Data Field in the inventory record that looks like the last picture. Custom Data Fields are a way to teach the KBOX agent to collect items that it is not collecting out of the box. You can learn more about Custom Data fields in the Admin Guide. Soon, we will be launching a couple of new forums for posting sample scripts and reports, and I will post these there when they are live.

strComputer = "." ' Local computer
strMemory = ""
i = 1

SET objWMIService = GETOBJECT("winmgmts:\\" & strComputer & "\root\cimv2")
SET colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory")

FOR EACH objItem In colItems

IF strMemory <> "" THEN strMemory = strMemory & vbcrlf
strMemory = strMemory & "Bank" & i & " : " & (objItem.Capacity / 1048576) & " Mb" & _
" - " & (1 / (objItem.Speed * 10^-3)) & "MHz"
i = i + 1
NEXT
installedModules = i - 1

SET colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray")

FOR EACH objItem in colItems
totalSlots = objItem.MemoryDevices
NEXT


wscript.echo "Total Slots: " & totalSlots & vbcrlf & _
"Free Slots: " & (totalSlots - installedModules) & vbcrlf & _
vbcrlf & "Installed Modules:" & vbcrlf & strMemory
Answered 12/01/2009 by: chrisgrim
Senior Purple Belt

  • it worked for me in xp; but windows 7 its not working
Please log in to comment
1
Sorry, the screen shots didn't seem to attach.
Answered 12/01/2009 by: chrisgrim
Senior Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity