From 68d0c4d37bb4c550986029f42a6e3a8c6cca5037 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 21 Oct 2014 01:48:59 +0100
Subject: Add "debug lludp get" command which currently just shows
scene-throttle-max to mirror "debug lludp set"
Information is also available in "show server throttles" but that's more for non-debug info rather than attempting to get and set parameters on the fly for debug purposes.
---
.../ClientStack/Linden/UDP/LLUDPServerCommands.cs | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
(limited to 'OpenSim/Region/ClientStack')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
index 325b04a..a1a0395 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
@@ -158,6 +158,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_console.Commands.AddCommand(
"Debug",
false,
+ "debug lludp get",
+ "debug lludp get",
+ "Get debug parameters for the server.",
+ "scene-throttle-max is the current max cumulative kbps provided for this scene to clients",
+ HandleGetCommand);
+
+ m_console.Commands.AddCommand(
+ "Debug",
+ false,
"debug lludp set",
"debug lludp set ",
"Set a parameter for the server.",
@@ -434,6 +443,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
});
}
+ private void HandleGetCommand(string module, string[] args)
+ {
+ if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
+ return;
+
+ m_console.OutputFormat("Debug settings for {0}", m_udpServer.Scene.Name);
+ ConsoleDisplayList cdl = new ConsoleDisplayList();
+
+ long maxSceneDripRate = m_udpServer.Throttle.MaxDripRate;
+ cdl.AddRow(
+ "scene-throttle-max",
+ maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset");
+
+ m_console.Output(cdl.ToString());
+ }
+
private void HandleSetCommand(string module, string[] args)
{
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
--
cgit v1.1