102 lines
2.0 KiB
Java
102 lines
2.0 KiB
Java
package de.gurkengewuerz.monitoring.object;
|
|
|
|
/**
|
|
* Created by gurkengewuerz.de on 21.10.2017.
|
|
*/
|
|
public class ServerStatus {
|
|
|
|
private String os;
|
|
private String cpu;
|
|
private int cpucount;
|
|
private int memTotal;
|
|
private int memFree;
|
|
private float load;
|
|
private long uptime;
|
|
private State state;
|
|
private long lastpoll;
|
|
|
|
public ServerStatus(String os, String cpu, int cpucount, int memTotal, int memFree, float load, long uptime, State state, long lastpoll) {
|
|
this.os = os == null ? "Unknown" : os;
|
|
this.cpu = cpu == null ? "Unknown" : cpu;
|
|
this.cpucount = cpucount;
|
|
this.memTotal = memTotal;
|
|
this.memFree = memFree;
|
|
this.load = load;
|
|
this.uptime = uptime;
|
|
this.state = state;
|
|
this.lastpoll = lastpoll;
|
|
}
|
|
|
|
public String getOS() {
|
|
return os;
|
|
}
|
|
|
|
public String getCPUModel() {
|
|
return cpu;
|
|
}
|
|
|
|
public int getCPUcount() {
|
|
return cpucount;
|
|
}
|
|
|
|
public int getMemTotal() {
|
|
return memTotal;
|
|
}
|
|
|
|
public int getMemFree() {
|
|
return memFree;
|
|
}
|
|
|
|
public float getLoad() {
|
|
return load;
|
|
}
|
|
|
|
public long getUptime() {
|
|
return uptime;
|
|
}
|
|
|
|
public State getState() {
|
|
return state;
|
|
}
|
|
|
|
public long getLastpoll() {
|
|
return lastpoll;
|
|
}
|
|
|
|
public void setOS(String os) {
|
|
this.os = os;
|
|
}
|
|
|
|
public void setCPU(String cpu) {
|
|
this.cpu = cpu;
|
|
}
|
|
|
|
public void setCPUcount(int cpucount) {
|
|
this.cpucount = cpucount;
|
|
}
|
|
|
|
public void setMemTotal(int memTotal) {
|
|
this.memTotal = memTotal;
|
|
}
|
|
|
|
public void setMemFree(int memFree) {
|
|
this.memFree = memFree;
|
|
}
|
|
|
|
public void setLoad(float load) {
|
|
this.load = load;
|
|
}
|
|
|
|
public void setUptime(long uptime) {
|
|
this.uptime = uptime;
|
|
}
|
|
|
|
public void setState(State state) {
|
|
this.state = state;
|
|
}
|
|
|
|
public void setLastpoll(long lastpoll) {
|
|
this.lastpoll = lastpoll;
|
|
}
|
|
}
|