LANDesk and remote computer memory measured in Bytes.

So here in my environment, we use Intel’s LANDesk software to keep tabs of our asset management. One of the interesting things to find is that LANDesk at the DB level when running reports tend to report the amount of memory it has in bytes instead of Gigabytes, and doing a easy bytes / 1024 / 1024 yields a decimal number as alot of the machines register that they have 1023MB of memory instead of the full 1024. My guess is that the ram is programmed this way to provide for bad sectors and to report to what is actually usable. That being the case after a few experiments I landed on crafting the following query to get a rounded value to the nearest 256MB and to report back in a pretty format to display to the end user in the report.

“CONVERT(DOUBLE PRECISION,((ROUND((CONVERT(decimal(8,2), m.BytesTotal) / 256), 0) * 256) / 1024)) as Div256DecRoundedToQuaterGigsWhole”

My train of thought and idea’s are below as I was working through this issue up until I landed on the solution above.

Leave a comment

Your email address will not be published. Required fields are marked *