diff --git a/api/grpc/server/server.go b/api/grpc/server/server.go index e3d86a2..b38433f 100644 --- a/api/grpc/server/server.go +++ b/api/grpc/server/server.go @@ -183,7 +183,7 @@ func (s *apiServer) State(ctx context.Context, r *types.StateRequest) (*types.St state := &types.StateResponse{ Machine: &types.Machine{ Cpus: uint32(m.Cpus), - Memory: uint64(m.Cpus), + Memory: uint64(m.Memory), }, } for _, c := range e.Containers { diff --git a/supervisor/machine.go b/supervisor/machine.go index afc448f..1dcada5 100644 --- a/supervisor/machine.go +++ b/supervisor/machine.go @@ -18,6 +18,6 @@ func CollectMachineInformation() (Machine, error) { if err := mem.Get(); err != nil { return m, err } - m.Memory = int64(mem.Total) + m.Memory = int64(mem.Total / 1024 / 1024) return m, nil }