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.
mb-throttle-test
Justin Clark-Casey (justincc) 2014-10-21 01:48:59 +01:00
parent 336790e7b4
commit 68d0c4d37b
1 changed files with 25 additions and 0 deletions

View File

@ -155,6 +155,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
+ "throttle-max - kbps, control maximum throttle setting for current and future clients\n",
HandleThrottleSetCommand);
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,
@ -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)