syntax = "proto3";
option go_package = "data/";

message info{
    Basicinfo basicinfo = 1;
    Hostinfo hostinfo = 2;
    Meminfo meminfo = 3;
    repeated Diskinfo diskinfo = 4;
    repeated Netinfo netinfo = 5;
}

// 基本信息
message Basicinfo{
    string model = 1;       // 设备型号
    string sn = 2;          // 设备SN
    string first_time = 3;  // 初次激活时间
}

// 主机信息
message Hostinfo{
    int32 cpu = 1;          // cpu核数
    string uptime = 2;      // 开机时长
    string boottime = 3;    // 开机时间
}

// 内存信息
message Meminfo{
    double total = 1;           // 总大小
    double available = 2;       // 可用
    double used = 3;            // 已用
    double used_percent = 4;    // 已用占比
    double free = 5;            // 空闲
    double buffers = 6;         // 缓冲区
    double cached = 7;          // 缓存
}

// 存储信息
message Diskinfo{
    string name = 1;            // 名称
    string path = 2;            // 路径
    double total = 3;           // 总大小
    double free = 4;            // 空闲
    double used = 5;            // 已用
    double used_percent = 6;    // 已用占比
}

// 网络信息
message Netinfo{
    string name = 1;        // 网卡名称
    uint64 bytesSent = 2;   // number of bytes sent
    uint64 bytesRecv = 3;   // number of bytes received
    uint64 packetsSent = 4; // number of packets sent
    uint64 packetsRecv = 5; // number of packets received
}