diff options
author | OldShatterham <repo@bsmfaktor.de> | 2020-06-10 15:19:30 +0200 |
---|---|---|
committer | OldShatterham <repo@bsmfaktor.de> | 2020-06-10 15:19:30 +0200 |
commit | c3a4b016534f1920c72d52cd047ea8bf883c576b (patch) | |
tree | 7eb6aa04a10222624fa82665091b217e2a5e60cf | |
parent | d9c0abc5e56bf56e15cba32a731215de8cc0861f (diff) |
Convert MiB to bytes
Properly convert nvidia-smi output (in MiB) to bytes (as used internally by gotop).
-rw-r--r-- | nvidia.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -117,8 +117,8 @@ func update() { errors[name] = err } _mems[name] = devices.MemoryInfo{ - Total: uint64(t), - Used: uint64(u), + Total: 1048576*uint64(t), + Used: 1048576*uint64(u), UsedPercent: float64(u) / float64(t), } } |