| 443 | } |
| 444 | |
| 445 | nlohmann::json RpcServer::VmResources(const VmRecord& record) const { |
| 446 | nlohmann::json out = { |
| 447 | {"disk_usage_bytes", DirectorySizeBytes(record.spec.vm_dir)}, |
| 448 | }; |
| 449 | if (record.runtime.pid > 0 && record.runtime.state == VmState::kRunning) { |
| 450 | out["process"] = ToJson(runtime_manager_.SampleProcessResources(record.spec.vm_id)); |
| 451 | } |
| 452 | return out; |
| 453 | } |
| 454 | |
| 455 | } // namespace tenbox::daemon |
nothing calls this directly
no test coverage detected