summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-02 16:14:02 +0200
committerimarom <imarom@cisco.com>2015-11-02 16:14:02 +0200
commit1586ab131f28c03ea65373d9e702e4051ffb9a56 (patch)
tree506444d4e0b0dad8325e8ac467583ee2024308ad /src
parent7d7767e17b1a4e54a8934ded724f54dc5b6228ce (diff)
status is back online + ZMQ async stats
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main_dpdk.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp
index b9fee6bd..d4e07ef2 100755
--- a/src/main_dpdk.cpp
+++ b/src/main_dpdk.cpp
@@ -3810,7 +3810,13 @@ void CGlobalTRex::get_stats(CGlobalStats & stats){
stats.m_total_clients = total_clients;
stats.m_total_servers = total_servers;
stats.m_active_sockets = active_sockets;
- stats.m_socket_util =100.0*(double)active_sockets/(double)total_sockets;
+
+ if (total_sockets != 0) {
+ stats.m_socket_util =100.0*(double)active_sockets/(double)total_sockets;
+ } else {
+ stats.m_socket_util = 0;
+ }
+
float drop_rate=total_tx-total_rx;