package com.wgcloud.entity;
|
|
import com.wgcloud.util.DateUtil;
|
import org.apache.commons.lang3.StringUtils;
|
|
import java.util.Date;
|
|
/**
|
* @version v3.3
|
* @ClassName:NetIoState.java
|
* @author: http://www.wgstart.com
|
* @date: 2021年1月16日
|
* @Description: 网络设备的吞吐率
|
* @Copyright: 2019-2021 wgcloud. All rights reserved.
|
*/
|
public class NetIoState extends BaseEntity {
|
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* host名称
|
*/
|
private String hostname;
|
|
/**
|
* 每秒钟接收的数据包,rxpck/s
|
*/
|
private String rxpck;
|
|
/**
|
* 每秒钟发送的数据包,txpck/s
|
*/
|
private String txpck;
|
|
|
/**
|
* 每秒钟接收的KB数,下行传输速率,KB/s
|
*/
|
private String rxbyt;
|
|
|
/**
|
* 每秒钟发送的KB数,上行传输速率,KB/s
|
*/
|
private String txbyt;
|
|
|
/**
|
* 每秒丢弃的传入数据包数
|
*/
|
private String dropin;
|
|
|
/**
|
* 每秒丢弃的传出数据包数
|
*/
|
private String dropout;
|
|
/**
|
* 主机连接数量包括tcp、udp、inet
|
*/
|
private String netConnections;
|
|
|
/**
|
* 添加时间
|
* yyyy-MM-dd hh:mm:ss
|
*/
|
private String dateStr;
|
|
/**
|
* 创建时间
|
*/
|
private Date createTime;
|
|
|
public String getRxpck() {
|
return rxpck;
|
}
|
|
public void setRxpck(String rxpck) {
|
this.rxpck = rxpck;
|
}
|
|
public String getTxpck() {
|
return txpck;
|
}
|
|
public void setTxpck(String txpck) {
|
this.txpck = txpck;
|
}
|
|
public String getRxbyt() {
|
return rxbyt;
|
}
|
|
public void setRxbyt(String rxbyt) {
|
this.rxbyt = rxbyt;
|
}
|
|
public String getTxbyt() {
|
return txbyt;
|
}
|
|
public void setTxbyt(String txbyt) {
|
this.txbyt = txbyt;
|
}
|
|
public String getDropin() {
|
if (StringUtils.isEmpty(dropin)) {
|
dropin = "0";
|
}
|
return dropin;
|
}
|
|
public void setDropin(String dropin) {
|
this.dropin = dropin;
|
}
|
|
public String getDropout() {
|
if (StringUtils.isEmpty(dropout)) {
|
dropout = "0";
|
}
|
return dropout;
|
}
|
|
public void setDropout(String dropout) {
|
this.dropout = dropout;
|
}
|
|
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;
|
}
|
|
public String getNetConnections() {
|
if (StringUtils.isEmpty(netConnections)) {
|
netConnections = "0";
|
}
|
return netConnections;
|
}
|
|
public void setNetConnections(String netConnections) {
|
this.netConnections = netConnections;
|
}
|
}
|