Improve Memory Reporting
This commit is contained in:
parent
0be5af70c3
commit
e51abbcbf7
1 changed files with 2 additions and 2 deletions
|
@ -23,8 +23,8 @@ func status(ctx context.Context, req rpc.Request) (any, error) {
|
|||
}
|
||||
mStats, _ := memory.Get()
|
||||
if mStats != nil {
|
||||
s.MemoryUsage = mStats.Used
|
||||
s.MemoryTotal = mStats.Total
|
||||
s.MemoryUsage = uint64(float64(mStats.Used) / float64(mStats.Total) * 100)
|
||||
s.MemoryTotal = mStats.Total / 1000000000
|
||||
}
|
||||
|
||||
return s, nil
|
||||
|
|
Loading…
Add table
Reference in a new issue