Field Unit Conversion
xAssets automatically converts numeric fields with byte-based units into human-readable formats. Fields that store values in bytes, kilobytes, or megabytes are displayed using larger, more appropriate units such as gigabytes or terabytes, making it easier to interpret hardware specifications at a glance.
Why Unit Conversion Matters
Discovery data is often collected in small units. For example, a hard disk capacity might be reported by the operating system as 512,000 megabytes, or a memory module might be recorded as 17,179,869,184 bytes. Displaying these raw values in queries and forms makes them difficult to read and compare.
With automatic unit conversion, these values are displayed as "512 GB" and "16 GB" respectively, which is immediately understandable.
How It Works
The unit conversion applies automatically to fields that are configured with byte-based data types. When xAssets displays these fields in queries, forms, or exports, the system:
- Detects the stored unit -- determines whether the raw value is in bytes (B), kilobytes (KB), megabytes (MB), or another unit based on the field's configuration.
- Selects the best display unit -- chooses the largest unit that results in a value of 1 or greater. For example, 2,048 MB becomes 2 GB rather than 0.002 TB.
- Formats the display value -- shows the converted value with the appropriate unit suffix.
| Raw Value | Stored Unit | Displayed As |
|---|---|---|
| 4,096 | MB | 4 GB |
| 1,048,576 | MB | 1 TB |
| 512 | MB | 512 MB |
| 8,589,934,592 | Bytes | 8 GB |
| 256 | GB | 256 GB |
The original raw value is preserved in the database unchanged. The conversion is purely a display-level transformation.
Where Unit Conversion Appears
Unit conversion is applied wherever the field value is rendered:
- Query results -- columns showing disk capacity, memory size, and similar fields
- Asset editing forms -- specification fields on the hardware detail tabs
- Exports -- Excel, CSV, and PDF exports include the converted values
- Charts and dashboards -- KPI tiles and charts that aggregate byte-based fields
Common Fields with Unit Conversion
The following discovered hardware fields typically use automatic unit conversion:
| Field | Typical Source | Example Display |
|---|---|---|
| Total Disk Capacity | Discovery (WMI, agent) | 512 GB, 1 TB |
| Free Disk Space | Discovery (WMI, agent) | 128 GB |
| Total Physical Memory (RAM) | Discovery (WMI, agent) | 16 GB, 32 GB |
| Video Memory | Discovery (WMI) | 2 GB, 4 GB |
| Page File Size | Discovery (WMI) | 8 GB |
Precision and Rounding
The conversion uses binary units (1 GB = 1,024 MB, 1 TB = 1,024 GB) consistent with how operating systems report storage and memory. Values are rounded to a reasonable number of decimal places for readability.
For example, a disk reported as 476,940 MB is displayed as approximately 466 GB (reflecting the actual usable capacity of a 500 GB drive after filesystem overhead).
Tips
Tip: When comparing asset specifications, the automatic unit conversion ensures that all values use the same scale. You do not need to mentally convert between MB and GB when scanning a list of servers.
Tip: If you need the exact raw value for a particular asset (e.g., for capacity planning calculations), open the asset record and check the specification data tab where both the raw and converted values may be shown.
Tip: Custom specification data fields can also benefit from unit conversion if they are configured with the appropriate data type. Consult your administrator if you have custom fields that should use this feature.
Related Articles
- Discovered Data for a Single Asset -- viewing detailed discovery data for an asset
- Hardware Analysis by Attribute -- analysing hardware specifications across your estate
- Asset Inventory Overview -- the inventory dashboard and its queries