* Added "show queues" command that shows throttling queues for all clients.
*** This only works for LLCLientView at the moment ***0.6.0-stable
parent
9eced15408
commit
8acb60df0d
|
@ -373,7 +373,7 @@ namespace OpenSim.Framework.Servers
|
||||||
/// That is something that cannot be determined within this class. So
|
/// That is something that cannot be determined within this class. So
|
||||||
/// all attempts to use the console MUST be verified.
|
/// all attempts to use the console MUST be verified.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void Notice(string msg)
|
protected void Notice(string msg)
|
||||||
{
|
{
|
||||||
if (m_console != null)
|
if (m_console != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,8 @@ namespace OpenSim
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static List<ConsolePluginCommand> m_PluginCommandInfos = new List<ConsolePluginCommand>();
|
private static List<ConsolePluginCommand> m_PluginCommandInfos = new List<ConsolePluginCommand>();
|
||||||
|
|
||||||
public OpenSim(IConfigSource configSource) : base(configSource)
|
public OpenSim(IConfigSource configSource)
|
||||||
|
: base(configSource)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -728,9 +729,49 @@ namespace OpenSim
|
||||||
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
|
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "queues":
|
||||||
|
Notice(GetQueuesReport());
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetQueuesReport()
|
||||||
|
{
|
||||||
|
string report = String.Empty;
|
||||||
|
|
||||||
|
m_sceneManager.ForEachScene(delegate(Scene scene)
|
||||||
|
{
|
||||||
|
scene.ForEachClient(delegate(IClientAPI client)
|
||||||
|
{
|
||||||
|
if (client is IStatsCollector)
|
||||||
|
{
|
||||||
|
report = report + client.FirstName +
|
||||||
|
" " + client.LastName + "\n";
|
||||||
|
|
||||||
|
IStatsCollector stats =
|
||||||
|
(IStatsCollector)client;
|
||||||
|
|
||||||
|
report = report + string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}\n",
|
||||||
|
"Send",
|
||||||
|
"In",
|
||||||
|
"Out",
|
||||||
|
"Resend",
|
||||||
|
"Land",
|
||||||
|
"Wind",
|
||||||
|
"Cloud",
|
||||||
|
"Task",
|
||||||
|
"Texture",
|
||||||
|
"Asset");
|
||||||
|
report = report + stats.Report() +
|
||||||
|
"\n\n";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return report;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new user
|
/// Create a new user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// Handles new client connections
|
/// Handles new client connections
|
||||||
/// Constructor takes a single Packet and authenticates everything
|
/// Constructor takes a single Packet and authenticates everything
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LLClientView : IClientAPI
|
public class LLClientView : IClientAPI, IStatsCollector
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -7265,7 +7265,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void SendRegionHandle(UUID regionID, ulong handle) {
|
public void SendRegionHandle(UUID regionID, ulong handle)
|
||||||
|
{
|
||||||
RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
|
RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
|
||||||
reply.ReplyBlock.RegionID = regionID;
|
reply.ReplyBlock.RegionID = regionID;
|
||||||
reply.ReplyBlock.RegionHandle = handle;
|
reply.ReplyBlock.RegionHandle = handle;
|
||||||
|
@ -7676,5 +7677,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
KillPacket kp = new KillPacket();
|
KillPacket kp = new KillPacket();
|
||||||
OutPacket(kp, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
|
OutPacket(kp, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Report()
|
||||||
|
{
|
||||||
|
LLPacketHandler handler = (LLPacketHandler)m_PacketHandler;
|
||||||
|
return handler.PacketQueue.GetStats();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4047,7 +4047,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return m_innerScene.TryGetAvatarByName(avatarName, out avatar);
|
return m_innerScene.TryGetAvatarByName(avatarName, out avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ForEachClient(Action<IClientAPI> action)
|
public void ForEachClient(Action<IClientAPI> action)
|
||||||
{
|
{
|
||||||
m_innerScene.ForEachClient(action);
|
m_innerScene.ForEachClient(action);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2589,6 +2589,7 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Data"/>
|
<Reference name="OpenSim.Data"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Region.ClientStack"/>
|
<Reference name="OpenSim.Region.ClientStack"/>
|
||||||
|
|
Loading…
Reference in New Issue