package com.tsi.api.server.vo;

import com.tsi.app.common.utils.TimeUtils;
import lombok.Data;

@Data
public class SystemStatusVo {
    private String clctDt;
    private String hostName;

    private String osType;
    private String osName;
    private String osVersion;
    private String osArch;
    private String kernelRelease;
    private String internalIp;
    private String externalIp;
    private long swapMem;
    private int cpuCnt;
    private String upTimes;     // system booting time

    private float totalMem;
    private float useMem;
    private float totalDisk;
    private float useDisk;

    private float useMemRate;       // calculate
    private float useCpuRate;
    private float useDiskRate;      // calculate

    private int tasks;
    private int threads;
    private float loadAvg;          // load average

    private long updateTm;
    private boolean update;

    public SystemStatusVo() {
        this.clctDt = TimeUtils.getCurrentTimeString();
        this.swapMem = 0;
        this.cpuCnt = 0;

        this.totalMem = 0;
        this.useMem = 0;
        this.totalDisk = 0;
        this.useDisk = 0;

        this.useMemRate = 0;       // calculate
        this.useCpuRate = 0;
        this.useDiskRate = 0;      // calculate

        this.tasks = 0;
        this.threads = 0;
        this.loadAvg = 0;          // load average

        this.update = true;
    }
}
