Can anyone help me on relevance for “Free RAM Slot for Linux”.
I am able to gather these information for Windows machine using DeviceLocator from Win32_PhysicalMemory of wmi class. Please have a look below for more clarifications:
So, Same way I need to gather Free RAM Slot information for LINUX machines.
On this server there are total 32 slots out of which 24 are free. I need to write the relevance in such a way that can fetch the value of Free RAM Slot from Linux machine.
I have tried with some of the code but looks like its fetching garbage (not correct) values.
1.
Q: (number of "Device_Locator" of "Physical_memory" of dmi)
A: 1
T: 0.066 ms
2.
Q: number of (string values "device_locator" of structures "memory_device" of smbios)
A: 2
T: 0.118 ms
3.
Q: (number of "Device_Locator" of "memory_device of dmi where Size!= 'No Module Installed'")
A: 1
T: 0.028 ms
I don’t have any physical Linux machines handy to really check the sanity of the results, but the answer should be below. I was able to test this on an Ubuntu VM.
physical_memory_array:
unique values of (item 0 of it & name of item 1 of it as trimmed string & "=" & item 1 of it as string as trimmed string) of (name of it & ": ", values of it) of structures whose("physical_memory_array"=name of it) of smbios
memory_device:
unique values of (item 0 of it & name of item 1 of it as trimmed string & "=" & item 1 of it as string as trimmed string) of (name of it & ": ", values of it) of structures whose("memory_device"=name of it) of smbios
number_of_memory_devices:
(it as string as integer) of values "number_of_memory_devices" of structures "physical_memory_array" of smbios
This should represent the number of motherboard ram slots
number of memory_devices
number of structures "memory_device" of smbios
This should be the same: number of values "device_locator" of structures "memory_device" of smbios
I have tried with modifying the content of the code for FREE RAM SLOT for Linux, Looks like SMBIOS fetching values for Windows OS perfectly but when I’m trying to check for Linux machine it’s showing some garbage or Irrelevant data.
Yes, Correct!!
We’re testing these code for Physical machines.
Below code will get total no. memory devices from Win32_Physical_Memory_Array Class. I am not sure If this class has predefine property which can show No. of Free RAM Slot.
Q: ((unique values of (item 0 of it & name of item 1 of it as trimmed string & “=” & item 1 of it as string as trimmed string) of (name of it & ": ", values of it) of structures whose(“physical_memory_array”=name of it) of smbios) whose (it contains “devices”))
A: physical_memory_array: number_of_memory_devices=64
T: 0.815 ms
Yes, We have cross checked on one of the Linux endpoint (Physical box) through command line: [~]# dmidecode -t 17 | grep -i “size: No Module Installed” | wc -l
O/P: 24 //Which Means 24 are Free RAM Slot outta 32 (Total RAM Slot).
I find this confusing. You are saying you are testing the relevance on linux, but then you are giving a screenshot from what appears to be the fixlet debugger, which is windows only.
You may need to use the DMI inspector to get the correct values for the linux system in question.
This relevance is not correct. This is the same as doing number of "a_string" which is meaningless.
Ahh, Sorry for the confusion!!
I’m testing the code on my local machine and production server (Both Windows).
After testing on fixlet debugger, I’m adding the code into one of the analyses and proving relevance only for Linux machines.
I believe both the code are working perfectly now:
Q: number of values "size" whose(0=it as string as integer) of structures "memory_device" of smbios
Q: number of sizes whose(0=it) of memory_devices of dmis
Here is the screenshot using both above code.
All I need to verify it from the end-user. I will keep you updated on the progress. @jgstew, I really appreciate your help on this. Tons of thanks for your precious time!
[root@ ~]# dmidecode -t 17 | grep -i “Size: No Module installed” | wc –l
I have tested the dmi command for gathering “Free RAM Slot” information on some of the physical server and its working properly. I am specifying filter for “Size: No Module installed” will show the exact no. of Free RAM slot on the machine.
That is awesome that this seems to be working. It seems the issue was figuring out how to get the right info out of the inspector. I misunderstood what the info in SMBIOS meant.
If the SMBIOS relevance works just fine, then that is what I would recommend using because it should work for Unix, Linux, and Windows, which is quite useful to have a single relevance statement for all platforms. (except mac)
On the Mac you have to use the IOKit registry instead, but it would be nice if Apple provided a SMBIOS compatible view into the same info.