System Information

System Information is the collection of inventory details about the hardware, operating system and software. Embedded devices can be built on any combinations of existing hardware and software components. As such, tracking the system information allows diagnostic data to be associated with a specific combination of components, each of which is also associated with a particular version. Component types include the following:

board

Motherboard/System-on-chip (SoC)

firmware

Firmware

os

Operating system

cpu

CPU

gpu

GPU

ram

RAM

disk

Storage devices

network

Network adapters

usb

USB controllers and devices

pci

PCI devices

PSYGIG Mobility IoT SDK associates the system information with all diagnostic data collected within the SDK. This provides the opportunity to realize valuable insights when system components are upgraded or replaced. For example, the application performance effects of upgrading to a GPU with a higher compute core count can be visualized in a comparison graph.

The System Information API includes many features suitable for integration into embedded systems:

  • Works on existing applications; no need to recompile source code

  • Multiplatform support

  • Up-to-date with latest hardware standards and technologies

  • Accurate hardware specifications (eg. CPU architecture) and measurements (eg. clock speed)

  • Maintain an inventory of peripheral devices and sensors

  • Generate a system information report in HTML

  • Export to a variety of file formats (eg. JSON, CSV, XML)

Using psymon

Without modifying your existing source code, you can instantly enable system information collection to your application by using the psymon script to run your program. For example:

psymon "/path/to/your/app --arg1 --arg2 --arg3"

See psymon man page for a complete list of options.

Using C/C++ SDK API

The System Information API can be accessed by including a single header file and linking the libpsyiage shared library. See Advanced Setup - Building your application with libpsyiage for details.

Sample system information output

{
    "SysInfo": {
        "CPUInfo": {
            "ThreadsPerCore": 1,
            "CoresPerPackage": 1,
            "NumPackages": 8,
            "Vendor": "GenuineIntel",
            "Model": "Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz",
            "Architecture": "x86",
            "Features": "aes avx avx2 bmi1 bmi2 cx16 erms f16c fma3 sse4_1 sse4_2 ssse3 ",
            "Endian": "Little Endian",
            "ClockMhz": 2808,
            "X86Info": {
                "Microarchitecture": "INTEL_KBL",
                "Family": 6,
                "Model": 158,
                "Stepping": 9
            },
            "CacheInfo": [
                {
                    "Level": 1,
                    "Size": 32768,
                    "LineSize": 64,
                    "Associativity": 8,
                    "Type": "Data"
                },
                {
                    "Level": 1,
                    "Size": 32768,
                    "LineSize": 64,
                    "Associativity": 8,
                    "Type": "Instruction"
                },
                {
                    "Level": 2,
                    "Size": 262144,
                    "LineSize": 64,
                    "Associativity": 4,
                    "Type": "Unified"
                },
                {
                    "Level": 3,
                    "Size": 6291456,
                    "LineSize": 64,
                    "Associativity": 12,
                    "Type": "Unified"
                }
            ]
        },
        "MemInfo": {
            "TotalRAM": 8339906560,
            "FreeRAM": 123629568,
            "SharedRAM": 1137197056,
            "BufferRAM": 14872576,
            "TotalSwap": 8587309056,
            "FreeSwap": 4164923392,
            "TotalHiMem": 0,
            "FreeHiMem": 0,
            "NumProcesses": 1106
        },
        "FileSystemInfo": [
            {
                "Device": "/dev/sda1",
                "MountDir": "/",
                "FileSystem": "ext4",
                "MountOpts": "rw,relatime,errors=remount-ro,d",
                "BlockSize": 4096,
                "FragSize": 4096,
                "TotalBlocks": 8223964,
                "FreeBlocks": 914408,
                "AvailBlocks": 490895,
                "TotalInodes": 2097152,
                "FreeInodes": 1239254,
                "AvailInodes": 1239254,
                "FileSystemID": 272869076,
                "FileSystemFlags": 4096
            },
            {
                "Device": "/home/psygig/.Private",
                "MountDir": "/home/psygig",
                "FileSystem": "ecryptfs",
                "MountOpts": "rw,nosuid,nodev,relatime,ecrypt",
                "BlockSize": 4096,
                "FragSize": 4096,
                "TotalBlocks": 8223964,
                "FreeBlocks": 914408,
                "AvailBlocks": 490895,
                "TotalInodes": 2097152,
                "FreeInodes": 1239254,
                "AvailInodes": 1239254,
                "FileSystemID": 272869076,
                "FileSystemFlags": 4102
            }
        ],
        "OSInfo": {
            "Name": "Ubuntu",
            "FullName": "Ubuntu 16.04.5 LTS",
            "CodeName": "xenial",
            "Major": 16,
            "Minor": 4,
            "Patch": 5,
            "Build": 0,
            "KernelInfo": {
                "Name": "Linux",
                "Major": 4,
                "Minor": 15,
                "Patch": 0,
                "Build": 43
            }
        },
        "USBInfo": [
            {
                "Product": "xHCI Host Controller",
                "Manufacturer": "Linux 4.15.0-43-generic xhci-hcd",
                "DeviceClass": "Hub",
                "Version": "4.15",
                "Serial": "0000:03:00.0",
                "UsbVersion": " 2.00",
                "ProductId": 2,
                "VendorId": 7531
            },
            {
                "Product": "EHCI Host Controller",
                "Manufacturer": "Linux 4.15.0-43-generic ehci_hcd",
                "DeviceClass": "Hub",
                "Version": "4.15",
                "Serial": "0000:02:03.0",
                "UsbVersion": " 2.00",
                "ProductId": 2,
                "VendorId": 7531
            },
            {
                "Product": "VMware Virtual USB Hub",
                "Manufacturer": "",
                "DeviceClass": "Hub",
                "Version": "1.0",
                "Serial": "",
                "UsbVersion": " 2.00",
                "ProductId": 2,
                "VendorId": 3599
            },
            {
                "Product": "Virtual Bluetooth Adapter",
                "Manufacturer": "VMware",
                "DeviceClass": "Wireless Controller",
                "Version": "1.0",
                "Serial": "000650268328",
                "UsbVersion": " 2.00",
                "ProductId": 8,
                "VendorId": 3599
            },
            {
                "Product": "xHCI Host Controller",
                "Manufacturer": "Linux 4.15.0-43-generic xhci-hcd",
                "DeviceClass": "Hub",
                "Version": "4.15",
                "Serial": "0000:03:00.0",
                "UsbVersion": " 3.00",
                "ProductId": 3,
                "VendorId": 7531
            },
            {
                "Product": "VMware Virtual USB Hub",
                "Manufacturer": "",
                "DeviceClass": "Hub",
                "Version": "1.0",
                "Serial": "",
                "UsbVersion": " 1.10",
                "ProductId": 2,
                "VendorId": 3599
            },
            {
                "Product": "UHCI Host Controller",
                "Manufacturer": "Linux 4.15.0-43-generic uhci_hcd",
                "DeviceClass": "Hub",
                "Version": "4.15",
                "Serial": "0000:02:00.0",
                "UsbVersion": " 1.10",
                "ProductId": 1,
                "VendorId": 7531
            },
            {
                "Product": "VMware Virtual USB Hub",
                "Manufacturer": "",
                "DeviceClass": "Hub",
                "Version": "1.0",
                "Serial": "",
                "UsbVersion": " 1.10",
                "ProductId": 2,
                "VendorId": 3599
            },
            {
                "Product": "VMware Virtual USB Mouse",
                "Manufacturer": "VMware",
                "DeviceClass": "Unknown",
                "Version": "1.3",
                "Serial": "",
                "UsbVersion": " 1.10",
                "ProductId": 3,
                "VendorId": 3599
            }
        ],
        "DiskInfo": [
            {
                "Device": "sr0",
                "Model": "VMware SATA CD01",
                "Vendor": "NECVMWar",
                "Serial": "",
                "Size": 1073741312,
                "PartitionInfo": []
            },
            {
                "Device": "sda",
                "Model": "VMware Virtual S",
                "Vendor": "VMware, ",
                "Serial": "",
                "Size": 42949672960,
                "PartitionInfo": [
                    {
                        "PartNum": 2,
                        "Start": 34360785920,
                        "Size": 1024
                    },
                    {
                        "PartNum": 5,
                        "Start": 34360786944,
                        "Size": 8587837440
                    },
                    {
                        "PartNum": 1,
                        "Start": 1048576,
                        "Size": 34358689792
                    }
                ]
            }
        ]
    }
}