feat: 支持raid检测(虽然几乎没有服务器有查得到的)

This commit is contained in:
spiritlhl
2025-04-01 12:20:23 +00:00
parent 00c85eb722
commit ce1d4d1456
4 changed files with 257 additions and 31 deletions

View File

@@ -5,5 +5,21 @@ import (
)
func TestGetSystemInfo(t *testing.T) {
// 检测整体
GetSystemInfo()
// 检测raid - 在服务器上几乎没有查得到的,不加入检测
// raidInfo, err := detectRAID()
// if err != nil {
// fmt.Printf("检测RAID时发生错误: %v\n", err)
// return
// }
// if raidInfo.Exists {
// fmt.Println("检测到RAID配置:")
// fmt.Printf("RAID类型: %s\n", raidInfo.Type)
// fmt.Printf("磁盘数量: %d\n", raidInfo.DiskCount)
// fmt.Printf("控制器: %s\n", raidInfo.Controller)
// // fmt.Printf("详细信息: %s\n", raidInfo.Details)
// } else {
// fmt.Println("未检测到RAID配置")
// }
}