NWinfo Documentation
repository·master·Indexed 20 days ago
https://github.com/a1ive/nwinfoA Win32 utility for deep hardware and system information retrieval that bypasses WMI to interact directly with CPU, PCI, and storage components. It includes a command-line tool (nwinfo) supporting Windows XP and later, a graphical user interface (gnwinfo) for Windows 7 and later, and the libcdi library for accessing S.M.A.R.T. disk information. The tool supports various output formats including YAML, JSON, LUA, TREE, and HTML, and can integrate with sensor providers like LibreHardwareMonitor, HWiNFO, and GPU-Z.
What's inside NWinfo
- Nuklear is a single-header, immediate mode, ANSI C cross-platform GUI library. It is designed to be lightweight and easy to integrate into various projects due to its single-header nature.
Overview of libcdi
masterlibcdi is a dynamic library for accessing S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology) information. It is based on the CrystalDiskInfo project.
Important Requirements:
- The host application must be run with administrator privileges to access disk hardware information.
- Supported platforms: Windows XP and later (x64 and x86 architectures).
Overview of libcpuid
masterlibcpuid is a small C library designed for x86 CPU detection and feature extraction. It allows developers to programmatically identify CPU characteristics and available instruction sets.Overview of NWinfo
masterNWinfo is a Win32 program designed to retrieve detailed system and hardware information. Unlike many similar tools, it gathers information directly from hardware interfaces without relying on Windows Management Instrumentation (WMI), which can improve reliability and depth of data.
Key Capabilities:
- Hardware Data: Retrieves information from SMBIOS, CPUID, S.M.A.R.T., PCI, SPD, EDID, and other hardware subsystems.
- Export Formats: Supports exporting gathered data into JSON, YAML, and HTML formats.
- Interface: Provides both a Graphical User Interface (GUI) and a Command Line Interface (CLI).
Overview of PawnIO
masterPawnIO is a project authored by namazso. It consists of core drivers and a modular system. Developers looking to extend or use PawnIO can access the core drivers and various modules through their respective GitHub repositories.
- Web: https://pawnio.eu/
- Drivers Repository: https://github.com/namazso/PawnIO
- Modules Repository: https://github.com/namazso/PawnIO.Modules
Icon theme information for nwinfo
masterThe icons used in this project are based on the Paper Icon Theme.Read sensor data with --sensors
masterThe
--sensors[=SRC,..]option allows you to read data from specific sensor providers. IfSRCis omitted, NWinfo attempts to initialize all available providers and prints those that succeed.Available Providers:
LHM: LibreHardwareMonitor (requiresliblhm.dllandLibreHardwareMonitorLib.dll)HWINFO: HWiNFO shared memory (requires HWiNFO running with shared memory enabled)GPU-Z: GPU-Z shared memory (requires GPU-Z running)CPU: Built-in CPU provider (utilization, frequency, MSR-based readings; requires driver for MSR)DIMM: Built-in memory provider (usage, thermal sensors; requires driver for SMBus)GPU: Built-in GPU provider (utilization, memory, temp, power, clocks, voltage, fan speed)SMART: Built-in S.M.A.R.T. provider (health, temp, lifetime vialibcdi)DISK: Built-in disk I/O provider (throughput, IOPS, latency, etc.)NET: Built-in network provider (throughput, traffic, link speed, WLAN signal)IMC: Built-in memory controller provider (requires driver)INTEL: Built-in Intel platform provider (MCH, PCH, MSR; requires driver)ZEN: Built-in AMD Zen provider (SMU/SMN; requires driver)
How to manage the CDI_SMART lifecycle
masterTo use libcdi, you must manage a
CDI_SMARTstructure. The lifecycle follows these steps:- COM Initialization: Call
CoInitializeExbefore callingcdi_create_smart. - Creation: Call
cdi_create_smart()to obtain aCDI_SMART*pointer. - Initialization: Call
cdi_init_smart(ptr, flags)to scan disks and collect data. This may take time. UseCDI_FLAG_DEFAULTfor standard processing. - Usage: Use the pointer with various getter functions to retrieve disk information.
- Cleanup: Call
cdi_destroy_smart(ptr)to free the memory allocated for the structure.
// Conceptual workflow CoInitializeEx(...); CDI_SMART* smart = cdi_create_smart(); cdi_init_smart(smart, CDI_FLAG_DEFAULT); // ... use smart pointer ... cdi_destroy_smart(smart); CoUninitialize();- COM Initialization: Call
Use NWinfo via CLI
masterNWinfo can be used from the command line to automate hardware information gathering and data export.
For a complete list of commands, flags, and arguments, refer to the detailed CLI (nwinfo) documentation.
Use the nwinfo CLI
masterThe
nwinfocommand-line tool is available for Windows XP and later. The basic usage pattern is:.\nwinfo.exe OPTIONSExample Commands
Export system and disk info to JSON:
.\nwinfo.exe --format=json --output=report.json --cp=UTF8 --sys --diskPrint PCI Display Controllers (Class 03):
.\nwinfo.exe --pci=03Export active physical network interfaces with IPv4 to HTML:
.\nwinfo.exe --format=html --output=report.html --net=active,phys,ipv4. \nwinfo.exe --format=json --output=report.json --cp=UTF8 --sys --diskInstall liblhm by providing LibreHardwareMonitorLib
masterTo use
liblhm, you must provide the underlying .NET dependency. Download theLibreHardwareMonitorLibpackage (.NET Framework 4.7.2) and place it in the same directory as theliblhmbinaries.https://nightly.link/LibreHardwareMonitor/LibreHardwareMonitor/workflows/master/master/LibreHardwareMonitorLib%20%28x64%29.zipInstall and manage PawnIO driver
masterThe PawnIO driver provides full access to CPU, SPD, and IMC sensors. It requires Windows (x64) 10 1809 or later.
Silent Installation:
.\PawnIOSetup.exe -install -silentSilent Uninstallation:
.\PawnIOSetup.exe -uninstall -silentManual Removal from DriverStore:
- Find the
<OEMXXX.inf>name:pnputil /enum-drivers - Delete the driver:
pnputil /delete-driver <oemXXX.inf> /uninstall
. PawnIOSetup.exe -install -silent- Find the