From 3d5a7e9b194d9d6a73091935e316b56d5302dcbb Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 31 Oct 2013 23:45:52 +0000
Subject: Add OutgoingPacketsResentCount clientstack stat.
This allows one to monitor the total number of messages resent to clients over time.
A constantly increasing stat may indicate a general server network or overloading issue if a fairly high proportion of packets sent
A smaller constantly increasing stat may indicate a problem with a particular client-server connection, would need to check "show queues" in this case.
---
.../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
(limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 218c2b2..ca17771 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -147,6 +147,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
StatsManager.RegisterStat(
new Stat(
+ "OutgoingPacketsResentCount",
+ "Number of packets resent because a client did not acknowledge receipt",
+ "",
+ "",
+ "clientstack",
+ scene.Name,
+ StatType.Pull,
+ MeasuresOfInterest.AverageChangeOverTime,
+ stat => stat.Value = m_udpServer.PacketsResentCount,
+ StatVerbosity.Debug));
+
+ StatsManager.RegisterStat(
+ new Stat(
"AverageUDPProcessTime",
"Average number of milliseconds taken to process each incoming UDP packet in a sample.",
"This is for initial receive processing which is separate from the later client LL packet processing stage.",
@@ -295,6 +308,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public Socket Server { get { return null; } }
///
+ /// Record how many packets have been resent
+ ///
+ internal int PacketsResentCount { get; set; }
+
+ ///
+ /// Record how many packets have been sent
+ ///
+ internal int PacketsSentCount { get; set; }
+
+ ///
/// Record how many inbound packets could not be recognized as LLUDP packets.
///
public int IncomingMalformedPacketCount { get; private set; }
@@ -1221,6 +1244,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Stats tracking
Interlocked.Increment(ref udpClient.PacketsSent);
+ // We're not going to worry about interlock yet since its not currently critical that this total count
+ // is 100% correct
+ PacketsSentCount++;
+
// Put the UDP payload on the wire
AsyncBeginSend(buffer);
--
cgit v1.1
From 4c4a1cf71526aa39346f2a8af124a5bcb51e735d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 31 Oct 2013 23:59:22 +0000
Subject: Start counting resent packets in the places that I missed when the
stat was first added a few commits ago
---
OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index ca17771..3bd1ef1 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1237,6 +1237,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else
{
Interlocked.Increment(ref udpClient.PacketsResent);
+
+ // We're not going to worry about interlock yet since its not currently critical that this total count
+ // is 100% correct
+ PacketsResentCount++;
}
#endregion Sequence Number Assignment
--
cgit v1.1