aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs52
1 files changed, 26 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
index 6e6a2d1..012a57d 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
53 "Comms", false, "show server throttles", 53 "Comms", false, "show server throttles",
54 "show server throttles", 54 "show server throttles",
55 "Show information about server throttles", 55 "Show information about server throttles",
56 HandleShowServerThrottlesCommand); 56 HandleShowServerThrottlesCommand);
57 57
58 m_console.Commands.AddCommand( 58 m_console.Commands.AddCommand(
59 "Debug", false, "debug lludp packet", 59 "Debug", false, "debug lludp packet",
@@ -207,8 +207,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
207 HandleClientGetCommand); 207 HandleClientGetCommand);
208 208
209 m_console.Commands.AddCommand( 209 m_console.Commands.AddCommand(
210 "Debug", 210 "Debug",
211 false, 211 false,
212 "debug lludp client set", 212 "debug lludp client set",
213 "debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]", 213 "debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]",
214 "Set a debug parameter for a particular client. If no name is given then the value is set on all clients.", 214 "Set a debug parameter for a particular client. If no name is given then the value is set on all clients.",
@@ -228,22 +228,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
228 228
229 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate; 229 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate;
230 cdl.AddRow( 230 cdl.AddRow(
231 "Max scene throttle", 231 "Max scene throttle",
232 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset"); 232 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset");
233 233
234 int maxClientDripRate = m_udpServer.ThrottleRates.Total; 234 int maxClientDripRate = m_udpServer.ThrottleRates.Total;
235 cdl.AddRow( 235 cdl.AddRow(
236 "Max new client throttle", 236 "Max new client throttle",
237 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset"); 237 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset");
238 238
239 m_console.Output(cdl.ToString()); 239 m_console.Output(cdl.ToString());
240 240
241 m_console.OutputFormat("{0}\n", GetServerThrottlesReport(m_udpServer)); 241 m_console.OutputFormat("{0}\n", GetServerThrottlesReport(m_udpServer));
242 } 242 }
243 243
244 private string GetServerThrottlesReport(LLUDPServer udpServer) 244 private string GetServerThrottlesReport(LLUDPServer udpServer)
245 { 245 {
246 StringBuilder report = new StringBuilder(); 246 StringBuilder report = new StringBuilder();
247 247
248 report.AppendFormat( 248 report.AppendFormat(
249 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", 249 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n",
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
254 "Cloud", 254 "Cloud",
255 "Task", 255 "Task",
256 "Texture", 256 "Texture",
257 "Asset"); 257 "Asset");
258 258
259 report.AppendFormat( 259 report.AppendFormat(
260 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", 260 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n",
@@ -265,7 +265,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
265 "kb/s", 265 "kb/s",
266 "kb/s", 266 "kb/s",
267 "kb/s", 267 "kb/s",
268 "kb/s"); 268 "kb/s");
269 269
270 ThrottleRates throttleRates = udpServer.ThrottleRates; 270 ThrottleRates throttleRates = udpServer.ThrottleRates;
271 report.AppendFormat( 271 report.AppendFormat(
@@ -277,16 +277,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
277 (throttleRates.Cloud * 8) / 1000, 277 (throttleRates.Cloud * 8) / 1000,
278 (throttleRates.Task * 8) / 1000, 278 (throttleRates.Task * 8) / 1000,
279 (throttleRates.Texture * 8) / 1000, 279 (throttleRates.Texture * 8) / 1000,
280 (throttleRates.Asset * 8) / 1000); 280 (throttleRates.Asset * 8) / 1000);
281 281
282 return report.ToString(); 282 return report.ToString();
283 } 283 }
284 284
285 protected string GetColumnEntry(string entry, int maxLength, int columnPadding) 285 protected string GetColumnEntry(string entry, int maxLength, int columnPadding)
286 { 286 {
287 return string.Format( 287 return string.Format(
288 "{0,-" + maxLength + "}{1,-" + columnPadding + "}", 288 "{0,-" + maxLength + "}{1,-" + columnPadding + "}",
289 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, 289 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry,
290 ""); 290 "");
291 } 291 }
292 292
@@ -375,7 +375,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
375 MainConsole.Instance.OutputFormat( 375 MainConsole.Instance.OutputFormat(
376 "Usage: debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]"); 376 "Usage: debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]");
377 return; 377 return;
378 } 378 }
379 379
380 string param = args[4]; 380 string param = args[4];
381 string rawValue = args[5]; 381 string rawValue = args[5];
@@ -467,7 +467,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
467 MainConsole.Instance.OutputFormat( 467 MainConsole.Instance.OutputFormat(
468 "Usage: debug lludp throttles get [<avatar-first-name> <avatar-last-name>]"); 468 "Usage: debug lludp throttles get [<avatar-first-name> <avatar-last-name>]");
469 return; 469 return;
470 } 470 }
471 471
472 string firstName = null; 472 string firstName = null;
473 string lastName = null; 473 string lastName = null;
@@ -491,7 +491,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
491 ConsoleDisplayList cdl = new ConsoleDisplayList(); 491 ConsoleDisplayList cdl = new ConsoleDisplayList();
492 cdl.AddRow("adaptive", udpClient.FlowThrottle.AdaptiveEnabled); 492 cdl.AddRow("adaptive", udpClient.FlowThrottle.AdaptiveEnabled);
493 cdl.AddRow("current", string.Format("{0} kbps", udpClient.FlowThrottle.DripRate * 8 / 1000)); 493 cdl.AddRow("current", string.Format("{0} kbps", udpClient.FlowThrottle.DripRate * 8 / 1000));
494 cdl.AddRow("request", string.Format("{0} kbps", udpClient.FlowThrottle.RequestedDripRate * 8 / 1000)); 494 cdl.AddRow("request", string.Format("{0} kbps", udpClient.FlowThrottle.RequestedDripRate * 8 / 1000));
495 cdl.AddRow("max", string.Format("{0} kbps", udpClient.FlowThrottle.MaxDripRate * 8 / 1000)); 495 cdl.AddRow("max", string.Format("{0} kbps", udpClient.FlowThrottle.MaxDripRate * 8 / 1000));
496 496
497 m_console.Output(cdl.ToString()); 497 m_console.Output(cdl.ToString());
@@ -509,12 +509,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
509 509
510 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate; 510 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate;
511 cdl.AddRow( 511 cdl.AddRow(
512 "max-scene-throttle", 512 "max-scene-throttle",
513 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset"); 513 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset");
514 514
515 int maxClientDripRate = m_udpServer.ThrottleRates.Total; 515 int maxClientDripRate = m_udpServer.ThrottleRates.Total;
516 cdl.AddRow( 516 cdl.AddRow(
517 "max-new-client-throttle", 517 "max-new-client-throttle",
518 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset"); 518 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset");
519 519
520 m_console.Output(cdl.ToString()); 520 m_console.Output(cdl.ToString());
@@ -529,7 +529,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
529 { 529 {
530 MainConsole.Instance.OutputFormat("Usage: debug lludp set <param> <value>"); 530 MainConsole.Instance.OutputFormat("Usage: debug lludp set <param> <value>");
531 return; 531 return;
532 } 532 }
533 533
534 string param = args[3]; 534 string param = args[3];
535 string rawValue = args[4]; 535 string rawValue = args[4];
@@ -552,7 +552,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
552 } 552 }
553 else 553 else
554 { 554 {
555 return; 555 return;
556 } 556 }
557 557
558 m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name); 558 m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name);
@@ -598,7 +598,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
598 { 598 {
599 MainConsole.Instance.OutputFormat("Usage: debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]"); 599 MainConsole.Instance.OutputFormat("Usage: debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]");
600 return; 600 return;
601 } 601 }
602 602
603 string param = args[4]; 603 string param = args[4];
604 string rawValue = args[5]; 604 string rawValue = args[5];
@@ -697,12 +697,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
697 697
698 string direction = args[3]; 698 string direction = args[3];
699 string subCommand = args[4]; 699 string subCommand = args[4];
700 string packetName = args[5]; 700 string packetName = args[5];
701 701
702 if (subCommand == "add") 702 if (subCommand == "add")
703 { 703 {
704 MainConsole.Instance.OutputFormat( 704 MainConsole.Instance.OutputFormat(
705 "Adding packet {0} to {1} drop list for all connections in {2}", 705 "Adding packet {0} to {1} drop list for all connections in {2}",
706 direction, packetName, m_udpServer.Scene.Name); 706 direction, packetName, m_udpServer.Scene.Name);
707 707
708 m_udpServer.Scene.ForEachScenePresence( 708 m_udpServer.Scene.ForEachScenePresence(
@@ -720,7 +720,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
720 else if (subCommand == "remove") 720 else if (subCommand == "remove")
721 { 721 {
722 MainConsole.Instance.OutputFormat( 722 MainConsole.Instance.OutputFormat(
723 "Removing packet {0} from {1} drop list for all connections in {2}", 723 "Removing packet {0} from {1} drop list for all connections in {2}",
724 direction, packetName, m_udpServer.Scene.Name); 724 direction, packetName, m_udpServer.Scene.Name);
725 725
726 m_udpServer.Scene.ForEachScenePresence( 726 m_udpServer.Scene.ForEachScenePresence(
@@ -868,10 +868,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
868 MainConsole.Instance.OutputFormat("OQRE in {0}", m_udpServer.Scene.Name); 868 MainConsole.Instance.OutputFormat("OQRE in {0}", m_udpServer.Scene.Name);
869 MainConsole.Instance.OutputFormat("Running: {0}", m_udpServer.OqrEngine.IsRunning); 869 MainConsole.Instance.OutputFormat("Running: {0}", m_udpServer.OqrEngine.IsRunning);
870 MainConsole.Instance.OutputFormat( 870 MainConsole.Instance.OutputFormat(
871 "Requests waiting: {0}", 871 "Requests waiting: {0}",
872 m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a"); 872 m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a");
873 } 873 }
874 else 874 else
875 { 875 {
876 MainConsole.Instance.OutputFormat("Unrecognized OQRE subcommand {0}", subCommand); 876 MainConsole.Instance.OutputFormat("Unrecognized OQRE subcommand {0}", subCommand);
877 } 877 }