// Copyright (c) 2023 Eleazar Garrido // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; package grpc.sysinfo.v1; option csharp_namespace = "Grpc.SysInfo.V1"; option go_package = "google.golang.org/grpc/health/grpc_sysinfo_v1"; option java_multiple_files = true; option java_outer_classname = "SysInfoProto"; option java_package = "io.grpc.sysinfo.v1"; // System information messages // Memory information in the system. message MemoryInfo { uint32 total = 1; // Total memory in the system (in bytes) uint32 free = 2; // Free memory in the system (in bytes) uint32 available = 3; // Available memory in the system (in bytes) uint32 swap_total = 4; // Total swap space in the system (in bytes) uint32 swap_free = 5; // Free swap space in the system (in bytes) } // CPU information in the system. message CpuInfo { string name = 1; // Name of the CPU float usage = 2; // CPU usage as a floating-point value uint64 frequency = 3; // CPU frequency (in Hz) string vendor_id = 4; // Vendor ID of the CPU string brand = 5; // Brand/model of the CPU } // Disk information in the system. message DiskInfo { string name = 1; // Name of the disk or storage device string file_system = 2; // Type of file system used on the disk string mount_point = 3; // Mount point of the disk in the file system uint32 total_space = 4; // Total available space on the disk (in bytes) uint32 available_space = 5; // Currently available space on the disk (in bytes) } // System information request message SystemInfoRequest { bool include_memory_info = 1; bool include_cpu_info = 2; bool include_disk_info = 3; uint32 refresh_interval = 4; // Interval to execute a refresh (in seconds) } // System information response message SystemInfoResponse { MemoryInfo memory_info = 1; repeated CpuInfo cpu_info = 2; repeated DiskInfo disk_info = 3; } // System information service service SystemInfoService { rpc GetSystemInfo(SystemInfoRequest) returns (SystemInfoResponse); rpc WatchSystemInfo(SystemInfoRequest) returns (stream SystemInfoResponse); }