@@ -11,6 +11,7 @@ service ControlService {
1111 // Other control API snoops will be skipped from the responses.
1212 rpc SnoopControl (SnoopControlRequest ) returns (stream SnoopControlReply );
1313 rpc GetHostCpuTopology (GetHostCpuTopologyRequest ) returns (GetHostCpuTopologyReply );
14+ rpc GetHostResources (GetHostResourcesRequest ) returns (GetHostResourcesReply );
1415
1516 rpc ListDevices (ListDevicesRequest ) returns (ListDevicesReply );
1617
@@ -719,6 +720,36 @@ message GetHostCpuTopologyReply {
719720 repeated HostCpuTopologyInfo cpus = 1 ;
720721}
721722
723+ // Requests aggregate memory, CPU, and topology figures for this machine.
724+ message GetHostResourcesRequest {}
725+
726+ // Memory, CPU, and topology figures for this machine. `hypervisor_*` values
727+ // describe the whole machine as the hypervisor sees it; `host_*` values
728+ // describe the host (dom0) that Edera runs in.
729+ message GetHostResourcesReply {
730+ // Memory figures are in bytes.
731+ uint64 hypervisor_free_memory = 1 ;
732+ uint64 hypervisor_used_memory = 2 ;
733+ uint64 hypervisor_total_memory = 3 ;
734+ uint64 host_free_memory = 4 ;
735+ uint64 host_used_memory = 5 ;
736+ uint64 host_total_memory = 6 ;
737+
738+ // CPU usage is the busy fraction as a percentage (0-100). Total time is the
739+ // cumulative elapsed CPU time since boot, summed across all logical CPUs, in
740+ // nanoseconds.
741+ double hypervisor_cpu_usage = 7 ;
742+ double host_cpu_usage = 8 ;
743+ uint64 hypervisor_cpu_total_time = 9 ;
744+ uint64 host_cpu_total_time = 10 ;
745+
746+ uint32 hypervisor_numa_nodes = 11 ;
747+ uint32 hypervisor_cpu_cores = 12 ;
748+ uint32 hypervisor_cpu_sockets = 13 ;
749+ uint32 host_cpu_cores = 14 ;
750+ uint32 host_cpu_sockets = 15 ;
751+ }
752+
722753// Sets the host power management policy. `scheduler` is a CPU frequency governor name,
723754// applied to all host CPUs. `smt_awareness` toggles SMT-aware power management.
724755message SetHostPowerManagementPolicyRequest {
0 commit comments