/**
* 平均每次TCP接收到的字节数,这个可以用来监控慢攻击,配置PacketsPerTcpReceive定位慢攻击
*/
public double getBytesPerTcpReceive() {
if (receivedTcps.get() == 0) {
return 0;
}
double ret = (double) receivedBytes.get() / (double) receivedTcps.get();
return ret;
}
/**
* 平均每次TCP接收到的业务包数,这个可以用来监控慢攻击,此值越小越有攻击嫌疑
*/
public double getPacketsPerTcpReceive() {
if (receivedTcps.get() == 0) {
return 0;
}
double ret = (double) receivedPackets.get() / (double) receivedTcps.get();
return ret;
}
https://cloud.tencent.com/info/f5682a7ada12d09b75dbcb6a167c17a9.html