NWinfo Documentation

repository·master·Indexed 20 days ago

https://github.com/a1ive/nwinfo

A 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.

Tokens
8.3K
Snippets
18
Records
38
Agent score
71%

What's inside NWinfo

  1. Overview of libcdi

    master

    libcdi 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).
  2. Overview of NWinfo

    master

    NWinfo 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).
  3. Read sensor data with --sensors

    master

    The --sensors[=SRC,..] option allows you to read data from specific sensor providers. If SRC is omitted, NWinfo attempts to initialize all available providers and prints those that succeed.

    Available Providers:

    • LHM: LibreHardwareMonitor (requires liblhm.dll and LibreHardwareMonitorLib.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 via libcdi)
    • 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)
  4. How to manage the CDI_SMART lifecycle

    master

    To use libcdi, you must manage a CDI_SMART structure. The lifecycle follows these steps:

    1. COM Initialization: Call CoInitializeEx before calling cdi_create_smart.
    2. Creation: Call cdi_create_smart() to obtain a CDI_SMART* pointer.
    3. Initialization: Call cdi_init_smart(ptr, flags) to scan disks and collect data. This may take time. Use CDI_FLAG_DEFAULT for standard processing.
    4. Usage: Use the pointer with various getter functions to retrieve disk information.
    5. 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();
  5. Use the nwinfo CLI

    master

    The nwinfo command-line tool is available for Windows XP and later. The basic usage pattern is:

    .\nwinfo.exe OPTIONS

    Example Commands

    Export system and disk info to JSON:

    .\nwinfo.exe --format=json --output=report.json --cp=UTF8 --sys --disk

    Print PCI Display Controllers (Class 03):

    .\nwinfo.exe --pci=03

    Export 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 --disk
  6. Install liblhm by providing LibreHardwareMonitorLib

    master

    To use liblhm, you must provide the underlying .NET dependency. Download the LibreHardwareMonitorLib package (.NET Framework 4.7.2) and place it in the same directory as the liblhm binaries.

    https://nightly.link/LibreHardwareMonitor/LibreHardwareMonitor/workflows/master/master/LibreHardwareMonitorLib%20%28x64%29.zip
  7. Install and manage PawnIO driver

    master

    The PawnIO driver provides full access to CPU, SPD, and IMC sensors. It requires Windows (x64) 10 1809 or later.

    Silent Installation:

    .\PawnIOSetup.exe -install -silent

    Silent Uninstallation:

    .\PawnIOSetup.exe -uninstall -silent

    Manual Removal from DriverStore:

    1. Find the <OEMXXX.inf> name:
      pnputil /enum-drivers
    2. Delete the driver:
      pnputil /delete-driver <oemXXX.inf> /uninstall
    .
    PawnIOSetup.exe -install -silent