Commit a9dd8628 authored by Your Name's avatar Your Name

update to monitor-smi:v.0.0.5

parent a6fdb093
......@@ -18,6 +18,8 @@ func CpuSmi() (Cpu, error) {
cores := 0
physicalMap := make(map[string]bool)
model := ""
for _, info := range infos {
......@@ -29,6 +31,8 @@ func CpuSmi() (Cpu, error) {
if len(model) == 0 {
model = info.ModelName
}
physicalMap[info.PhysicalID] = true
}
idx := strings.IndexAny(model, "@")
......@@ -53,6 +57,7 @@ func CpuSmi() (Cpu, error) {
return Cpu{
Model: model,
Number: int64(len(physicalMap)),
Cores: int64(c),
Threads: int64(len(infos)),
Usage: percentAsInt,
......
......@@ -2,7 +2,7 @@ version: "3.9"
services:
monitorSmi:
image: docker.ai.17xuexi.com/monitorapi/monitor-smi:v.0.0.4
image: docker.ai.17xuexi.com/monitorapi/monitor-smi:v.0.0.5
network_mode: host
volumes:
- /proc:/host/proc:ro
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment