aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs73
1 files changed, 40 insertions, 33 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index a7ebecc..5fe5948 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -35,7 +35,7 @@ using Nini.Config;
35using OpenMetaverse; 35using OpenMetaverse;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
38using OpenSim.Framework.Statistics; 38using OpenSim.Framework.Monitoring;
39using OpenSim.Region.ClientStack.LindenUDP; 39using OpenSim.Region.ClientStack.LindenUDP;
40using OpenSim.Region.Framework.Interfaces; 40using OpenSim.Region.Framework.Interfaces;
41using OpenSim.Region.Framework.Scenes; 41using OpenSim.Region.Framework.Scenes;
@@ -82,18 +82,6 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
82 m_scenes[scene.RegionInfo.RegionID] = scene; 82 m_scenes[scene.RegionInfo.RegionID] = scene;
83 83
84 scene.AddCommand( 84 scene.AddCommand(
85 "Comms", this, "image queues clear",
86 "image queues clear <first-name> <last-name>",
87 "Clear the image queues (textures downloaded via UDP) for a particular client.",
88 (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd)));
89
90 scene.AddCommand(
91 "Comms", this, "image queues show",
92 "image queues show <first-name> <last-name>",
93 "Show the image queues (textures downloaded via UDP) for a particular client.",
94 (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd)));
95
96 scene.AddCommand(
97 "Comms", this, "show pqueues", 85 "Comms", this, "show pqueues",
98 "show pqueues [full]", 86 "show pqueues [full]",
99 "Show priority queue data for each client", 87 "Show priority queue data for each client",
@@ -105,8 +93,15 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
105 "Comms", this, "show queues", 93 "Comms", this, "show queues",
106 "show queues [full]", 94 "show queues [full]",
107 "Show queue data for each client", 95 "Show queue data for each client",
108 "Without the 'full' option, only root agents are shown." 96 "Without the 'full' option, only root agents are shown.\n"
109 + " With the 'full' option child agents are also shown.", 97 + "With the 'full' option child agents are also shown.\n\n"
98 + "Type - Rt is a root (avatar) client whilst cd is a child (neighbour interacting) client.\n"
99 + "Since Last In - Time in milliseconds since last packet received.\n"
100 + "Pkts In - Number of packets processed from the client.\n"
101 + "Pkts Out - Number of packets sent to the client.\n"
102 + "Pkts Resent - Number of packets resent to the client.\n"
103 + "Bytes Unacked - Number of bytes transferred to the client that are awaiting acknowledgement.\n"
104 + "Q Pkts * - Number of packets of various types (land, wind, etc.) to be sent to the client that are waiting for available bandwidth.\n",
110 (mod, cmd) => MainConsole.Instance.Output(GetQueuesReport(cmd))); 105 (mod, cmd) => MainConsole.Instance.Output(GetQueuesReport(cmd)));
111 106
112 scene.AddCommand( 107 scene.AddCommand(
@@ -114,6 +109,12 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
114 "show image queues <first-name> <last-name>", 109 "show image queues <first-name> <last-name>",
115 "Show the image queues (textures downloaded via UDP) for a particular client.", 110 "Show the image queues (textures downloaded via UDP) for a particular client.",
116 (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); 111 (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd)));
112
113 scene.AddCommand(
114 "Comms", this, "clear image queues",
115 "clear image queues <first-name> <last-name>",
116 "Clear the image queues (textures downloaded via UDP) for a particular client.",
117 (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd)));
117 118
118 scene.AddCommand( 119 scene.AddCommand(
119 "Comms", this, "show throttles", 120 "Comms", this, "show throttles",
@@ -373,17 +374,22 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
373 int maxNameLength = 18; 374 int maxNameLength = 18;
374 int maxRegionNameLength = 14; 375 int maxRegionNameLength = 14;
375 int maxTypeLength = 4; 376 int maxTypeLength = 4;
376 int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; 377
378 int totalInfoFieldsLength
379 = maxNameLength + columnPadding
380 + maxRegionNameLength + columnPadding
381 + maxTypeLength + columnPadding;
377 382
378 report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); 383 report.Append(GetColumnEntry("User", maxNameLength, columnPadding));
379 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); 384 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding));
380 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); 385 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
381 386
382 report.AppendFormat( 387 report.AppendFormat(
383 "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n", 388 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7} {12,7}\n",
389 "Since",
390 "Pkts",
384 "Pkts", 391 "Pkts",
385 "Pkts", 392 "Pkts",
386 "Pkts",
387 "Bytes", 393 "Bytes",
388 "Q Pkts", 394 "Q Pkts",
389 "Q Pkts", 395 "Q Pkts",
@@ -396,7 +402,8 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
396 402
397 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); 403 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
398 report.AppendFormat( 404 report.AppendFormat(
399 "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n", 405 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7} {12,7}\n",
406 "Last In",
400 "In", 407 "In",
401 "Out", 408 "Out",
402 "Resent", 409 "Resent",
@@ -417,22 +424,22 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
417 scene.ForEachClient( 424 scene.ForEachClient(
418 delegate(IClientAPI client) 425 delegate(IClientAPI client)
419 { 426 {
420 if (client is IStatsCollector) 427 bool isChild = client.SceneAgent.IsChildAgent;
421 { 428 if (isChild && !showChildren)
422 bool isChild = client.SceneAgent.IsChildAgent; 429 return;
423 if (isChild && !showChildren) 430
424 return; 431 string name = client.Name;
425 432 if (pname != "" && name != pname)
426 string name = client.Name; 433 return;
427 if (pname != "" && name != pname)
428 return;
429 434
430 string regionName = scene.RegionInfo.RegionName; 435 string regionName = scene.RegionInfo.RegionName;
431 436
432 report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); 437 report.Append(GetColumnEntry(name, maxNameLength, columnPadding));
433 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); 438 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
434 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); 439 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
435 440
441 if (client is IStatsCollector)
442 {
436 IStatsCollector stats = (IStatsCollector)client; 443 IStatsCollector stats = (IStatsCollector)client;
437 444
438 report.AppendLine(stats.Report()); 445 report.AppendLine(stats.Report());