aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs22
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs4
2 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index 2e7278b..ca3fd4b 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -37,7 +37,9 @@ namespace OpenSim.Framework.Statistics
37 /// Collects sim statistics which aren't already being collected for the linden viewer's statistics pane 37 /// Collects sim statistics which aren't already being collected for the linden viewer's statistics pane
38 /// </summary> 38 /// </summary>
39 public class SimExtraStatsCollector : IStatsCollector 39 public class SimExtraStatsCollector : IStatsCollector
40 { 40 {
41 private long abnormalClientThreadTerminations;
42
41 private long assetsInCache; 43 private long assetsInCache;
42 private long texturesInCache; 44 private long texturesInCache;
43 private long assetCacheMemoryUsage; 45 private long assetCacheMemoryUsage;
@@ -45,6 +47,11 @@ namespace OpenSim.Framework.Statistics
45 private long blockedMissingTextureRequests; 47 private long blockedMissingTextureRequests;
46 48
47 private long inventoryServiceRetrievalFailures; 49 private long inventoryServiceRetrievalFailures;
50
51 /// <summary>
52 /// Number of times that a client thread terminated because of an exception
53 /// </summary>
54 public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } }
48 55
49 public long AssetsInCache { get { return assetsInCache; } } 56 public long AssetsInCache { get { return assetsInCache; } }
50 public long TexturesInCache { get { return texturesInCache; } } 57 public long TexturesInCache { get { return texturesInCache; } }
@@ -71,6 +78,11 @@ namespace OpenSim.Framework.Statistics
71 /// </summary> 78 /// </summary>
72 private IDictionary<LLUUID, PacketQueueStatsCollector> packetQueueStatsCollectors 79 private IDictionary<LLUUID, PacketQueueStatsCollector> packetQueueStatsCollectors
73 = new Dictionary<LLUUID, PacketQueueStatsCollector>(); 80 = new Dictionary<LLUUID, PacketQueueStatsCollector>();
81
82 public void AddAbnormalClientThreadTermination()
83 {
84 abnormalClientThreadTerminations++;
85 }
74 86
75 public void AddAsset(AssetBase asset) 87 public void AddAsset(AssetBase asset)
76 { 88 {
@@ -147,6 +159,14 @@ namespace OpenSim.Framework.Statistics
147Blocked requests for missing textures: {2}" + Environment.NewLine, 159Blocked requests for missing textures: {2}" + Environment.NewLine,
148 TexturesInCache, TextureCacheMemoryUsage / 1024.0, 160 TexturesInCache, TextureCacheMemoryUsage / 1024.0,
149 BlockedMissingTextureRequests)); 161 BlockedMissingTextureRequests));
162
163 sb.Append(Environment.NewLine);
164 sb.Append("CONNECTION STATISTICS");
165 sb.Append(Environment.NewLine);
166 sb.Append(
167 string.Format(
168 "Abnormal client thread terminations: {0}" + Environment.NewLine,
169 abnormalClientThreadTerminations));
150 170
151 sb.Append(Environment.NewLine); 171 sb.Append(Environment.NewLine);
152 sb.Append("INVENTORY STATISTICS"); 172 sb.Append("INVENTORY STATISTICS");
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 230fe3c..af23660 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -39,6 +39,7 @@ using libsecondlife.Packets;
39using log4net; 39using log4net;
40using OpenSim.Framework; 40using OpenSim.Framework;
41using OpenSim.Framework.Communications.Cache; 41using OpenSim.Framework.Communications.Cache;
42using OpenSim.Framework.Statistics;
42using OpenSim.Region.ClientStack.LindenUDP; 43using OpenSim.Region.ClientStack.LindenUDP;
43using OpenSim.Region.Environment.Scenes; 44using OpenSim.Region.Environment.Scenes;
44using Timer=System.Timers.Timer; 45using Timer=System.Timers.Timer;
@@ -729,6 +730,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
729 if (e is ThreadAbortException) 730 if (e is ThreadAbortException)
730 throw e; 731 throw e;
731 732
733 if (StatsManager.SimExtraStats != null)
734 StatsManager.SimExtraStats.AddAbnormalClientThreadTermination();
735
732 // Don't let a failure in an individual client thread crash the whole sim. 736 // Don't let a failure in an individual client thread crash the whole sim.
733 // FIXME: could do more sophisticated cleanup since leaving client resources around may 737 // FIXME: could do more sophisticated cleanup since leaving client resources around may
734 // cause instability for the region server over time. 738 // cause instability for the region server over time.