CUT-4021 - Add SystemInsights Readable Format for bytes
What does this solve?
Currently with Get-JCSystemInsights, when returning information from the tables LogicalDrives, Mounts and systemInfo, some of the fields are returned in bytes, which isn't inherently human readable. We want to mimic the functionality of the console and do some calculations to convert the bytes into GB so that it is easier to read.
We are adding the following calculated fields for the Get-JCSystemInsights Tables:
LogicalDrives - freeSpaceGB, sizeGB
Mounts - blocksGB, blocksAvailableGB
systemInfo - physicalMemoryGB
Is there anything particularly tricky?
Windows systems calculate memory and storage with base 2 but display it with a base 10 unit whereas Linux/Mac devices calculate using base 10.
In order to mimic the console, separate calculations need to be completed (LogicalDrives table is used for Windows devices whereas Mount table is used for Linux/Mac)
How should this be tested?
Run the following script to import the module and connect to your org (Replace the USER path and APIKEY):
Issues
What does this solve?
Currently with
Get-JCSystemInsights
, when returning information from the tablesLogicalDrives
,Mounts
andsystemInfo
, some of the fields are returned in bytes, which isn't inherently human readable. We want to mimic the functionality of the console and do some calculations to convert the bytes into GB so that it is easier to read.We are adding the following calculated fields for the
Get-JCSystemInsights
Tables:LogicalDrives
- freeSpaceGB, sizeGBMounts
- blocksGB, blocksAvailableGBsystemInfo
- physicalMemoryGBIs there anything particularly tricky?
Windows systems calculate memory and storage with base 2 but display it with a base 10 unit whereas Linux/Mac devices calculate using base 10.
In order to mimic the console, separate calculations need to be completed (LogicalDrives table is used for Windows devices whereas Mount table is used for Linux/Mac)
How should this be tested?
systemID
.Highlights
tab, scroll until you seeDevice Overview
Memory
PhysicalMemoryGB
field matches the Memory value in the ConsolesystemID
.Insights
tab, select theSystem and Hardware
tab and scroll to theMounts
sectionStorage
andStorage Available
BlocksAvailableGB
andBlocksGB
fields match theStorageAvailable
andStorage
values in the ConsolesystemID
.Insights
tab, select theSystem and Hardware
tab and scroll to theLogical Drives
sectionStorage
andStorage Available
FreeSpaceGB
andSizeGB
fields match theStorageAvailable
andStorage
values in the Console