package com.wgcloud.entity;
|
|
import com.wgcloud.util.DateUtil;
|
import org.apache.commons.lang3.StringUtils;
|
|
import java.util.Date;
|
|
/**
|
* @version v3.3
|
* @ClassName:SysLoadState.java
|
* @author: http://www.wgstart.com
|
* @date: 2021年1月16日
|
* @Description: uptime查看系统负载状态
|
* @Copyright: 2019-2021 wgcloud. All rights reserved.
|
*/
|
public class SysLoadState extends BaseEntity {
|
|
/**
|
*
|
*/
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* host名称
|
*/
|
private String hostname;
|
|
/**
|
* 1分钟之前到现在的负载
|
*/
|
private Double oneLoad;
|
|
/**
|
* 5分钟之前到现在的负载
|
*/
|
private Double fiveLoad;
|
|
/**
|
* 15分钟之前到现在的负载
|
*/
|
private Double fifteenLoad;
|
|
/**
|
* 登录用户数量 废弃
|
*/
|
private String users;
|
|
/**
|
* 添加时间
|
* yyyy-MM-dd hh:mm:ss
|
*/
|
private String dateStr;
|
|
/**
|
* 创建时间
|
*/
|
private Date createTime;
|
|
|
public Double getOneLoad() {
|
if (null == oneLoad) {
|
oneLoad = 0d;
|
}
|
return oneLoad;
|
}
|
|
public void setOneLoad(Double oneLoad) {
|
this.oneLoad = oneLoad;
|
}
|
|
public Double getFiveLoad() {
|
if (null == fiveLoad) {
|
fiveLoad = 0d;
|
}
|
return fiveLoad;
|
}
|
|
public void setFiveLoad(Double fiveLoad) {
|
this.fiveLoad = fiveLoad;
|
}
|
|
public Double getFifteenLoad() {
|
if (null == fifteenLoad) {
|
fifteenLoad = 0d;
|
}
|
return fifteenLoad;
|
}
|
|
public void setFifteenLoad(Double fifteenLoad) {
|
this.fifteenLoad = fifteenLoad;
|
}
|
|
public String getUsers() {
|
return users;
|
}
|
|
public void setUsers(String users) {
|
this.users = users;
|
}
|
|
|
public Date getCreateTime() {
|
return createTime;
|
}
|
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
public String getDateStr() {
|
String s = DateUtil.getDateTimeString(this.getCreateTime());
|
if (!StringUtils.isEmpty(s) && s.length() > 16) {
|
return s.substring(5);
|
}
|
return dateStr;
|
}
|
|
public void setDateStr(String dateStr) {
|
this.dateStr = dateStr;
|
}
|
|
|
public String getHostname() {
|
return hostname;
|
}
|
|
public void setHostname(String hostname) {
|
this.hostname = hostname;
|
}
|
|
|
}
|