调整流量带宽分局点统计数据
This commit is contained in:
@@ -32,8 +32,15 @@
|
||||
</select>
|
||||
<!-- 根据最近时间条获取带宽,进出口流量 -->
|
||||
<select id="getNetFlowPortInfoNew" resultType="java.util.HashMap">
|
||||
SELECT IFNULL(SUM(c2s_byte_len),0) inoctets ,IFNULL(SUM(s2c_byte_len),0) outoctets FROM traffic_trans_statistic
|
||||
where stat_time = #{statTime}
|
||||
|
||||
SELECT SUM(total_traffic.inoctets) AS inoctets ,SUM(total_traffic.outoctets) AS outoctets FROM (
|
||||
SELECT IFNULL(SUM(c2s_byte_len),0) inoctets ,IFNULL(SUM(s2c_byte_len),0) outoctets FROM traffic_trans_statistic
|
||||
where stat_time = (SELECT stat_time FROM traffic_trans_statistic WHERE entrance_id=1 ORDER BY stat_time DESC LIMIT 0,1) and entrance_id=1
|
||||
UNION ALL
|
||||
SELECT IFNULL(SUM(c2s_byte_len),0) inoctets ,IFNULL(SUM(s2c_byte_len),0) outoctets FROM traffic_trans_statistic
|
||||
where stat_time = (SELECT stat_time FROM traffic_trans_statistic WHERE entrance_id=2 ORDER BY stat_time DESC LIMIT 0,1) and entrance_id=2
|
||||
) total_traffic
|
||||
|
||||
</select>
|
||||
<!-- 获取近五分钟的带宽根据ip46,协议 tcp,udp变化 -->
|
||||
<select id="getBandwidthTrans" resultMap="BandwidthResultMap">
|
||||
|
||||
Reference in New Issue
Block a user