Skip to content

Commit

Permalink
overlock & gpu global are ok
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Mar 13, 2022
1 parent f5b2e18 commit bec47b0
Showing 2 changed files with 6 additions and 6 deletions.
Binary file modified 2miner-monitoring
Binary file not shown.
12 changes: 6 additions & 6 deletions handlers/HiveosWorker.go
Original file line number Diff line number Diff line change
@@ -84,16 +84,16 @@ func setHiveosWorkerOverclock(Overclock data.Overclock, CardControlIndex *data.H
PowerLimit := strings.Split(Overclock.Nvidia.PowerLimit, " ")
for i, _ := range FanSpeed { //Some value exepct Fan speed seems to be packed sometimes...
k := i
if len(CoreClock) < i {
if i + 1 > len(CoreClock) {
k = 0
}
esOverclock.Nvidia.MemClock, _ = strconv.Atoi(MemClock[k])
esOverclock.Nvidia.CoreClock, _ = strconv.Atoi(CoreClock[k])
esOverclock.Nvidia.PowerLimit, _ = strconv.Atoi(PowerLimit[k])
esOverclock.Nvidia.FanSpeed, _ = strconv.Atoi(FanSpeed[i])
CardControlIndex.GPU[i].HiveosOverclock = esOverclock
EsCarInfoJson, _ := json.Marshal(CardControlIndex.GPU[i].HiveosOverclock)
es.Bulk("2miners-hiveos-gpu-total-info", string(EsCarInfoJson))
EsCardInfoJson, _ := json.Marshal(CardControlIndex.GPU[i])
es.Bulk("2miners-hiveos-gpu-total-info", string(EsCardInfoJson))
}
}
if Overclock.Amd.FanSpeed != "" {
@@ -107,7 +107,7 @@ func setHiveosWorkerOverclock(Overclock data.Overclock, CardControlIndex *data.H
esOverclock.Amd.Aggressive = Overclock.Amd.Aggressive
for i, _ := range FanSpeed { //Some value exepct Fan speed seems to be packed sometimes...
k := i
if len(CoreClock) < i {
if i + 1 > len(CoreClock) {
k = 0
}
esOverclock.Amd.MemMvdd, _ = strconv.Atoi(MemMvdd[k])
@@ -118,8 +118,8 @@ func setHiveosWorkerOverclock(Overclock data.Overclock, CardControlIndex *data.H
esOverclock.Amd.CoreState, _ = strconv.Atoi(CoreState[k])
esOverclock.Amd.FanSpeed, _ = strconv.Atoi(FanSpeed[i])
CardControlIndex.GPU[i].HiveosOverclock = esOverclock
EsCarInfoJson, _ := json.Marshal(CardControlIndex.GPU[i].HiveosOverclock)
es.Bulk("2miners-hiveos-gpu-total-info", string(EsCarInfoJson))
EsCardInfoJson, _ := json.Marshal(CardControlIndex.GPU[i])
es.Bulk("2miners-hiveos-gpu-total-info", string(EsCardInfoJson))
}
}

0 comments on commit bec47b0

Please sign in to comment.