summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/include/smbprofile.h2
-rw-r--r--source3/smbd/process.c2
-rw-r--r--source3/smbd/server_exit.c1
3 files changed, 5 insertions, 0 deletions
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index 67ffa77dfd..acf80e6543 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -27,6 +27,8 @@
SMBPROFILE_STATS_START \
\
SMBPROFILE_STATS_SECTION_START("SMBD loop") \
+ SMBPROFILE_STATS_COUNT(connect) \
+ SMBPROFILE_STATS_COUNT(disconnect) \
SMBPROFILE_STATS_BASIC(idle) \
SMBPROFILE_STATS_COUNT(request) \
SMBPROFILE_STATS_BASIC(push_sec_ctx) \
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 2e611e2537..c7f0e9ade9 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -3573,6 +3573,8 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
*_xconn = NULL;
+ DO_PROFILE_INC(connect);
+
xconn = talloc_zero(client, struct smbXsrv_connection);
if (xconn == NULL) {
DEBUG(0,("talloc_zero(struct smbXsrv_connection)\n"));
diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c
index 6a51c24f54..e5d32b8fe7 100644
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -224,6 +224,7 @@ static void exit_server_common(enum server_exit_reason how,
next = xconn->next;
DLIST_REMOVE(client->connections, xconn);
talloc_free(xconn);
+ DO_PROFILE_INC(disconnect);
}
TALLOC_FREE(client->sconn);
}