From 1b90238f28424c2dd820f6b21aea25845d0c0156 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 14 May 2008 22:23:17 +0000
Subject: * Start recording initial complete avatar inventory retrieval
failures from the region server * In theory, this should be a somewhat
useless statistic since the user server will already have tried to use the
inventory service to retrieve the avatar's skeleton. If this fails, login is
halted completely. * Nonetheless I'm recording it anyway just to see whether
it happens (yes, I'm too lazy to scan the logs...)
---
.../Framework/Statistics/SimExtraStatsCollector.cs | 24 +++++++++++++++++++++-
.../Communications/OGS1/OGS1InventoryService.cs | 6 +++++-
prebuild.xml | 3 ++-
3 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index 2beb3a0..3716f9b 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -43,12 +43,21 @@ namespace OpenSim.Framework.Statistics
private long assetCacheMemoryUsage;
private long textureCacheMemoryUsage;
+ private long inventoryServiceRetrievalFailures;
+
public long AssetsInCache { get { return assetsInCache; } }
public long TexturesInCache { get { return texturesInCache; } }
public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
///
+ /// Number of known failures to retrieve avatar inventory from the inventory service. This does not
+ /// cover situations where the inventory service accepts the request but never returns any data, since
+ /// we do not yet timeout this situation.
+ ///
+ public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } }
+
+ ///
/// Retain a dictionary of all packet queues stats reporters
///
private IDictionary packetQueueStatsCollectors
@@ -70,6 +79,11 @@ namespace OpenSim.Framework.Statistics
}
}
+ public void AddInventoryServiceRetrievalFailure()
+ {
+ inventoryServiceRetrievalFailures++;
+ }
+
///
/// Register as a packet queue stats provider
///
@@ -110,7 +124,15 @@ namespace OpenSim.Framework.Statistics
Texture cache contains {2,6} textures using {3,10:0.000}K" + Environment.NewLine,
AssetsInCache, AssetCacheMemoryUsage / 1024.0,
TexturesInCache, TextureCacheMemoryUsage / 1024.0));
-
+
+ sb.Append(Environment.NewLine);
+ sb.Append("INVENTORY STATISTICS");
+ sb.Append(Environment.NewLine);
+ sb.Append(
+ string.Format(
+ "Initial inventory caching failures: {0}" + Environment.NewLine,
+ InventoryServiceRetrievalFailures));
+
sb.Append(Environment.NewLine);
sb.Append("PACKET QUEUE STATISTICS");
sb.Append(Environment.NewLine);
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
index f7037ea..0f75a09 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
@@ -35,6 +35,7 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
+using OpenSim.Framework.Statistics;
namespace OpenSim.Region.Communications.OGS1
{
@@ -79,8 +80,11 @@ namespace OpenSim.Region.Communications.OGS1
}
catch (WebException e)
{
+ if (StatsManager.SimExtraStats != null)
+ StatsManager.SimExtraStats.AddInventoryServiceRetrievalFailure();
+
m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}",
- e.Source, e.Message);
+ e.Source, e.Message);
}
}
else
diff --git a/prebuild.xml b/prebuild.xml
index 65c3452..a00c547 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -722,9 +722,10 @@
+
-
+
--
cgit v1.1