From 8e1e8a0920a9e94305619e9afb8e053b4daefb89 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 12 Jan 2015 20:56:37 +0000 Subject: Make the performance controlling job processing threads introduced in conference code use a generic JobEngine class rather than 4 slightly different copy/pasted versions. --- .../ClientStack/Linden/UDP/LLUDPServerCommands.cs | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs index e0398d5..17a394d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs @@ -186,6 +186,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP "debug lludp toggle agentupdate", "Toggle whether agentupdate packets are processed or simply discarded.", HandleAgentUpdateCommand); + + MainConsole.Instance.Commands.AddCommand( + "Debug", + false, + "debug lludp oqre", + "debug lludp oqre ", + "Start, stop or get status of OutgoingQueueRefillEngine.", + "If stopped then refill requests are processed directly via the threadpool.", + HandleOqreCommand); } private void HandleShowServerThrottlesCommand(string module, string[] args) @@ -758,5 +767,42 @@ namespace OpenSim.Region.ClientStack.LindenUDP MainConsole.Instance.OutputFormat( "Packet debug level for new clients is {0}", m_udpServer.DefaultClientPacketDebugLevel); } + + private void HandleOqreCommand(string module, string[] args) + { + if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) + return; + + if (args.Length != 4) + { + MainConsole.Instance.Output("Usage: debug lludp oqre "); + return; + } + + string subCommand = args[3]; + + if (subCommand == "stop") + { + m_udpServer.OqrEngine.Stop(); + MainConsole.Instance.OutputFormat("Stopped OQRE for {0}", m_udpServer.Scene.Name); + } + else if (subCommand == "start") + { + m_udpServer.OqrEngine.Start(); + MainConsole.Instance.OutputFormat("Started OQRE for {0}", m_udpServer.Scene.Name); + } + else if (subCommand == "status") + { + MainConsole.Instance.OutputFormat("OQRE in {0}", m_udpServer.Scene.Name); + MainConsole.Instance.OutputFormat("Running: {0}", m_udpServer.OqrEngine.IsRunning); + MainConsole.Instance.OutputFormat( + "Requests waiting: {0}", + m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a"); + } + else + { + MainConsole.Instance.OutputFormat("Unrecognized OQRE subcommand {0}", subCommand); + } + } } } \ No newline at end of file -- cgit v1.1