diff options
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 664e23e..9dfe0e9 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -247,6 +247,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
247 | //private UDPClientCollection m_clients = new UDPClientCollection(); | 247 | //private UDPClientCollection m_clients = new UDPClientCollection(); |
248 | /// <summary>Bandwidth throttle for this UDP server</summary> | 248 | /// <summary>Bandwidth throttle for this UDP server</summary> |
249 | protected TokenBucket m_throttle; | 249 | protected TokenBucket m_throttle; |
250 | |||
251 | /// <summary> | ||
252 | /// Gets the maximum total drip rate allowed to all clients. | ||
253 | /// </summary> | ||
254 | public long MaxTotalDripRate { get { return m_throttle.RequestedDripRate; } } | ||
250 | 255 | ||
251 | /// <summary>Bandwidth throttle rates for this UDP server</summary> | 256 | /// <summary>Bandwidth throttle rates for this UDP server</summary> |
252 | public ThrottleRates ThrottleRates { get; private set; } | 257 | public ThrottleRates ThrottleRates { get; private set; } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs index 5b23080..354a47d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | |||
@@ -48,6 +48,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
48 | public void Register() | 48 | public void Register() |
49 | { | 49 | { |
50 | m_console.Commands.AddCommand( | 50 | m_console.Commands.AddCommand( |
51 | "Comms", false, "show server throttles", | ||
52 | "show server throttles", | ||
53 | "Show information about server throttles", | ||
54 | HandleShowServerThrottlesCommand); | ||
55 | |||
56 | m_console.Commands.AddCommand( | ||
51 | "Debug", false, "debug lludp packet", | 57 | "Debug", false, "debug lludp packet", |
52 | "debug lludp packet [--default | --all] <level> [<avatar-first-name> <avatar-last-name>]", | 58 | "debug lludp packet [--default | --all] <level> [<avatar-first-name> <avatar-last-name>]", |
53 | "Turn on packet debugging. This logs information when the client stack hands a processed packet off to downstream code or when upstream code first requests that a certain packet be sent.", | 59 | "Turn on packet debugging. This logs information when the client stack hands a processed packet off to downstream code or when upstream code first requests that a certain packet be sent.", |
@@ -155,6 +161,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
155 | HandleAgentUpdateCommand); | 161 | HandleAgentUpdateCommand); |
156 | } | 162 | } |
157 | 163 | ||
164 | private void HandleShowServerThrottlesCommand(string module, string[] args) | ||
165 | { | ||
166 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) | ||
167 | return; | ||
168 | |||
169 | m_console.OutputFormat("Throttles for {0}", m_udpServer.Scene.Name); | ||
170 | ConsoleDisplayList cdl = new ConsoleDisplayList(); | ||
171 | cdl.AddRow("Adaptive throttles", m_udpServer.ThrottleRates.AdaptiveThrottlesEnabled); | ||
172 | cdl.AddRow( | ||
173 | "Max scene throttle", | ||
174 | m_udpServer.MaxTotalDripRate != 0 ? string.Format("{0} kbit", m_udpServer.MaxTotalDripRate / 8 / 1000) : "unset"); | ||
175 | |||
176 | m_console.Output(cdl.ToString()); | ||
177 | } | ||
178 | |||
158 | private void HandleDataCommand(string module, string[] args) | 179 | private void HandleDataCommand(string module, string[] args) |
159 | { | 180 | { |
160 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) | 181 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) |