#cpu #disk #gpu #ram #system-information #serial-number

systemd_info

通过 WMIC 获取一些系统信息

1 个稳定版本

1.0.0 2024年5月22日

#656文件系统

MIT/Apache

6KB
77

mac_conditions

支持的平台:任何支持 WMIC 的 Windows 版本。

示例

use systemd_info;

fn main() {
    
    let serial_number = systemd_info::get_bios_serial_number().unwrap();
    let cpu_name = systemd_info::cpu_name().expect("Failed to get CPU name");
    let ramgb = systemd_info::ram_info().expect("Failed to get RAM name");
    let disk_info = systemd_info::get_disk_info().expect("Failed to get DISK name");
    let gpu_name = systemd_info::get_gpu_info().expect("Failed to get GPU name");
    println!("Serial Number: {}", serial_number);
    println!("CPU Name: {}", cpu_name);
    println!("RAM: {} GB", ramgb);
    println!("Disk: {}", disk_info);
    println!("GPU: {}", gpu_name);
}

许可证

mac_conditions 适用于 MIT 和 Apache 2.0 许可证

依赖项

~2–3MB
~53K SLoC