aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-10-06 20:34:17 +0100
committerJustin Clark-Casey (justincc)2014-11-25 23:18:39 +0000
commitc8f5add2fc2c33437a0b3162daaea8816696cd74 (patch)
tree1f57bf66bf5feffaa142eabec4951cbcd82b14bd /OpenSim/Region/ClientStack/Linden
parentrefactor: Use simpler auto-implemented property for HttpPort in GridRegion (diff)
downloadopensim-SC_OLD-c8f5add2fc2c33437a0b3162daaea8816696cd74.zip
opensim-SC_OLD-c8f5add2fc2c33437a0b3162daaea8816696cd74.tar.gz
opensim-SC_OLD-c8f5add2fc2c33437a0b3162daaea8816696cd74.tar.bz2
opensim-SC_OLD-c8f5add2fc2c33437a0b3162daaea8816696cd74.tar.xz
Add "show server throttles" command for showing server specific information about throttles
This is separate from the user-oriented "show throttles" command since one will often only want to know about varying client throttle settings. Currently displays max scene throttle and adaptive throttles config if set.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs5
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs21
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)