aboutsummaryrefslogtreecommitdiff
path: root/forward.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-08-23 22:03:16 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-08-23 22:03:16 +0000
commit16322c78ff4805ae5848541fd3b9a8dcdb077310 (patch)
tree057f8155debf6d3e5ec987fffdfd891bcb3ec2f9 /forward.c
parentAdded --remote-random-hostname option. (diff)
downloadopenvpn-16322c78ff4805ae5848541fd3b9a8dcdb077310.tar.xz
Added "load-stats" management interface command to get global
server load statistics. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@4844 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'forward.c')
-rw-r--r--forward.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/forward.c b/forward.c
index e4063d2..2c26927 100644
--- a/forward.c
+++ b/forward.c
@@ -32,6 +32,7 @@
#include "event.h"
#include "ps.h"
#include "dhcp.h"
+#include "common.h"
#include "memdbg.h"
@@ -39,6 +40,9 @@
#include "occ-inline.h"
#include "ping-inline.h"
+counter_type link_read_bytes_global; /* GLOBAL */
+counter_type link_write_bytes_global; /* GLOBAL */
+
/* show event wait debugging info */
#ifdef ENABLE_DEBUG
@@ -704,6 +708,7 @@ process_incoming_link (struct context *c)
if (c->c2.buf.len > 0)
{
c->c2.link_read_bytes += c->c2.buf.len;
+ link_read_bytes_global += c->c2.buf.len;
c->c2.original_recv_size = c->c2.buf.len;
#ifdef ENABLE_MANAGEMENT
if (management)
@@ -1103,6 +1108,7 @@ process_outgoing_link (struct context *c)
{
c->c2.max_send_size_local = max_int (size, c->c2.max_send_size_local);
c->c2.link_write_bytes += size;
+ link_write_bytes_global += size;
#ifdef ENABLE_MANAGEMENT
if (management)
{