We first tried on a Raspberry Pi 4, no info seems to be coming except in Networks, where IP and MAC address are one of the few pieces of information entered.
We then tried (With the same Debian distro) on a Asus h61m-f, there we get a little more information on the bios, but for instance RAM is not filled in.
For CPU on Raspberry Pi 4 it only collects the L caches for the CPU, that's it.
These attempts have been done as sudo.
We also tried running it on Windows and then it collects everything.
We are just testing this for now before we decide to use it or not, as such we are just collecting everything and dumping it.
public async Task<ClientHelperHardwareEntity> GetHardware()
{
var clientHelperHardwareEntity = new ClientHelperHardwareEntity();
hardwareInfo.RefreshAll();
var bios = hardwareInfo.BiosList.FirstOrDefault();
if (bios != null)
{
clientHelperHardwareEntity.Bios = new ClientHelperHardwareBios
{
Caption = bios.Caption,
Description = bios.Description,
Manufacturer = bios.Manufacturer,
Name = bios.Name,
ReleaseDate = bios.ReleaseDate,
SerialNumber = bios.SerialNumber,
SoftwareElementID = bios.SoftwareElementID,
Version = bios.Version,
};
}
var cpu = hardwareInfo.CpuList.FirstOrDefault();
if (cpu != null)
{
clientHelperHardwareEntity.Cpu = new ClientHelperHardwareCpu
{
Caption= cpu.Caption,
CurrentClockSpeed = cpu.CurrentClockSpeed,
Description = cpu.Description,
L1InstructionCacheSize = cpu.L1InstructionCacheSize,
L1DataCacheSize = cpu.L1DataCacheSize,
L2CacheSize = cpu.L2CacheSize,
L3CacheSize = cpu.L3CacheSize,
Manufacturer = cpu.Manufacturer,
MaxClockSpeed = cpu.MaxClockSpeed,
Name = cpu.Name,
NumberOfCores = cpu.NumberOfCores,
NumberOfLogicalProcessors = cpu.NumberOfLogicalProcessors,
ProcessorId = cpu.ProcessorId,
SecondLevelAddressTranslationExtensions = cpu.SecondLevelAddressTranslationExtensions,
SocketDesignation = cpu.SocketDesignation,
VirtualizationFirmwareEnabled = cpu.VirtualizationFirmwareEnabled,
VMMonitorModeExtensions = cpu.VMMonitorModeExtensions,
PercentProcessorTime = cpu.PercentProcessorTime,
};
}
foreach (var drive in hardwareInfo.DriveList)
{
clientHelperHardwareEntity.Drives.Add(new ClientHelperHardwareDrive
{
Caption = drive.Caption,
Description = drive.Description,
FirmwareRevision = drive.FirmwareRevision,
Index = drive.Index,
Manufacturer = drive.Manufacturer,
Model = drive.Model,
Name = drive.Name,
Partitions = drive.Partitions,
SerialNumber = drive.SerialNumber,
Size = drive.Size,
});
}
foreach (var memory in hardwareInfo.MemoryList)
{
clientHelperHardwareEntity.Memories.Add(new ClientHelperHardwareMemory
{
BankLabel = memory.BankLabel,
Capacity = memory.Capacity,
Manufacturer = memory.Manufacturer,
MaxVoltage = memory.MaxVoltage,
MinVoltage = memory.MinVoltage,
PartNumber = memory.PartNumber,
SerialNumber = memory.SerialNumber,
Speed = memory.Speed,
});
}
foreach (var monitor in hardwareInfo.MonitorList)
{
clientHelperHardwareEntity.Monitors.Add(new ClientHelperHardwareMonitor
{
Caption = monitor.Caption,
Description = monitor.Description,
MonitorManufacturer = monitor.MonitorManufacturer,
MonitorType = monitor.MonitorType,
Name = monitor.Name,
PixelsPerXLogicalInch = monitor.PixelsPerXLogicalInch,
PixelsPerYLogicalInch = monitor.PixelsPerYLogicalInch,
});
}
var motherboard = hardwareInfo.MotherboardList.FirstOrDefault();
if (motherboard != null)
{
clientHelperHardwareEntity.Motherboard = new ClientHelperHardwareMotherboard
{
Manufacturer = motherboard.Manufacturer,
Product = motherboard.Product,
SerialNumber = motherboard.SerialNumber,
};
}
foreach (var gpu in hardwareInfo.VideoControllerList)
{
clientHelperHardwareEntity.Gpus.Add(new ClientHelperHardwareGpu
{
AdapterRAM = gpu.AdapterRAM,
Caption = gpu.Caption,
CurrentBitsPerPixel = gpu.CurrentBitsPerPixel,
CurrentHorizontalResolution = gpu.CurrentHorizontalResolution,
CurrentNumberOfColors = gpu.CurrentNumberOfColors,
CurrentRefreshRate = gpu.CurrentRefreshRate,
CurrentVerticalResolution = gpu.CurrentVerticalResolution,
Description = gpu.Description,
DriverDate = gpu.DriverDate,
DriverVersion = gpu.DriverVersion,
Manufacturer = gpu.Manufacturer,
MaxRefreshRate = gpu.MaxRefreshRate,
MinRefreshRate = gpu.MinRefreshRate,
Name = gpu.Name,
VideoModeDescription = gpu.VideoModeDescription,
VideoProcessor = gpu.VideoProcessor,
});
}
foreach (var network in hardwareInfo.NetworkAdapterList)
{
clientHelperHardwareEntity.Networks.Add(new ClientHelperHardwareNetwork
{
AdapterType = network.AdapterType,
Caption = network.Caption,
Description = network.Description,
MACAddress = network.MACAddress,
Manufacturer = network.Manufacturer,
Name = network.Name,
NetConnectionID = network.NetConnectionID,
ProductName = network.ProductName,
Speed = network.Speed,
BytesSentPersec = network.BytesSentPersec,
BytesReceivedPersec = network.BytesReceivedPersec,
DefaultIPGatewayList = network.DefaultIPGatewayList.ConvertAll(x => new ClientHelperHardwareNetworkIp { IP = x.Address.ToString()}),
DHCPServer = new ClientHelperHardwareNetworkIp { IP = network.DHCPServer.Address.ToString()},
DNSServerSearchOrderList = network.DNSServerSearchOrderList.ConvertAll(x => new ClientHelperHardwareNetworkIp { IP = x.Address.ToString() }),
IPAddressList = network.IPAddressList.Where(x => x.IsIPv6LinkLocal == false).ToList().ConvertAll(x => new ClientHelperHardwareNetworkIp { IP = x.Address.ToString() }),
IPSubnetList = network.IPSubnetList.ConvertAll(x => new ClientHelperHardwareNetworkIp { IP = x.Address.ToString() }),
});
}
foreach (var sound in hardwareInfo.SoundDeviceList)
{
clientHelperHardwareEntity.Sounds.Add(new ClientHelperHardwareNetworkSound
{
Caption = sound.Caption,
Description = sound.Description,
Manufacturer = sound.Manufacturer,
Name = sound.Name,
ProductName = sound.ProductName,
});
}
_logger.LogInformation(JsonConvert.SerializeObject(clientHelperHardwareEntity, Formatting.Indented));
return clientHelperHardwareEntity;
}
We are running these clients over diskless PXE, but that shouldn't be a problem should it, as it just reads the linux directories for the data it needs?