aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-10-31 23:45:52 +0000
committerJustin Clark-Casey (justincc)2013-10-31 23:45:52 +0000
commit3d5a7e9b194d9d6a73091935e316b56d5302dcbb (patch)
tree1992f7f7451c216e34798df447c01efe05da5547 /OpenSim
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-3d5a7e9b194d9d6a73091935e316b56d5302dcbb.zip
opensim-SC_OLD-3d5a7e9b194d9d6a73091935e316b56d5302dcbb.tar.gz
opensim-SC_OLD-3d5a7e9b194d9d6a73091935e316b56d5302dcbb.tar.bz2
opensim-SC_OLD-3d5a7e9b194d9d6a73091935e316b56d5302dcbb.tar.xz
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.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs27
2 files changed, 32 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 03cd2b4..5d3b5b5 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3801,7 +3801,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3801 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber); 3801 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
3802 3802
3803 // Count this as a resent packet since we are going to requeue all of the updates contained in it 3803 // Count this as a resent packet since we are going to requeue all of the updates contained in it
3804 Interlocked.Increment(ref m_udpClient.PacketsResent); 3804 Interlocked.Increment(ref m_udpClient.PacketsResent);
3805
3806 // We're not going to worry about interlock yet since its not currently critical that this total count
3807 // is 100% correct
3808 m_udpServer.PacketsResentCount++;
3805 3809
3806 foreach (EntityUpdate update in updates) 3810 foreach (EntityUpdate update in updates)
3807 ResendPrimUpdate(update); 3811 ResendPrimUpdate(update);
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
147 147
148 StatsManager.RegisterStat( 148 StatsManager.RegisterStat(
149 new Stat( 149 new Stat(
150 "OutgoingPacketsResentCount",
151 "Number of packets resent because a client did not acknowledge receipt",
152 "",
153 "",
154 "clientstack",
155 scene.Name,
156 StatType.Pull,
157 MeasuresOfInterest.AverageChangeOverTime,
158 stat => stat.Value = m_udpServer.PacketsResentCount,
159 StatVerbosity.Debug));
160
161 StatsManager.RegisterStat(
162 new Stat(
150 "AverageUDPProcessTime", 163 "AverageUDPProcessTime",
151 "Average number of milliseconds taken to process each incoming UDP packet in a sample.", 164 "Average number of milliseconds taken to process each incoming UDP packet in a sample.",
152 "This is for initial receive processing which is separate from the later client LL packet processing stage.", 165 "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
295 public Socket Server { get { return null; } } 308 public Socket Server { get { return null; } }
296 309
297 /// <summary> 310 /// <summary>
311 /// Record how many packets have been resent
312 /// </summary>
313 internal int PacketsResentCount { get; set; }
314
315 /// <summary>
316 /// Record how many packets have been sent
317 /// </summary>
318 internal int PacketsSentCount { get; set; }
319
320 /// <summary>
298 /// Record how many inbound packets could not be recognized as LLUDP packets. 321 /// Record how many inbound packets could not be recognized as LLUDP packets.
299 /// </summary> 322 /// </summary>
300 public int IncomingMalformedPacketCount { get; private set; } 323 public int IncomingMalformedPacketCount { get; private set; }
@@ -1221,6 +1244,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1221 // Stats tracking 1244 // Stats tracking
1222 Interlocked.Increment(ref udpClient.PacketsSent); 1245 Interlocked.Increment(ref udpClient.PacketsSent);
1223 1246
1247 // We're not going to worry about interlock yet since its not currently critical that this total count
1248 // is 100% correct
1249 PacketsSentCount++;
1250
1224 // Put the UDP payload on the wire 1251 // Put the UDP payload on the wire
1225 AsyncBeginSend(buffer); 1252 AsyncBeginSend(buffer);
1226 1253