From c4f3175e173b399f533fc42be36631d97b696a5a Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 17 Nov 2010 19:58:27 +0000 Subject: [PATCH] add "Unacked bytes" column to "show queues" This should show the number of bytes sent to the client that it has not yet acknowledged. --- OpenSim/Region/Application/OpenSim.cs | 18 +++++++++++------- .../ClientStack/LindenUDP/LLUDPClient.cs | 3 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index c20a4e81a4..a90ce33650 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -306,7 +306,9 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "show queues", "show queues", - "Show queue data", HandleShow); + "Show queue data for each client", + HandleShow); + m_console.Commands.AddCommand("region", false, "show ratings", "show ratings", "Show rating data", HandleShow); @@ -994,7 +996,7 @@ namespace OpenSim int columnPadding = 2; int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 5; + int maxTypeLength = 4; int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); @@ -1002,7 +1004,7 @@ namespace OpenSim report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); report.AppendFormat( - "{0,9} {1,10} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7} {9,7}\n", + "{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", "Packets", "Packets", "Bytes", @@ -1012,13 +1014,15 @@ namespace OpenSim "Bytes", "Bytes", "Bytes", + "Bytes", "Bytes"); report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); report.AppendFormat( - "{0,9} {1,10} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7} {9,7}\n", - "Sent", - "Received", + "{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", + "Out", + "In", + "Unacked", "Resend", "Land", "Wind", @@ -1047,7 +1051,7 @@ namespace OpenSim regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); report.AppendFormat( "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", - scene.PresenceChildStatus(client.AgentId) ? "Child" : "Root", ""); + scene.PresenceChildStatus(client.AgentId) ? "Cd" : "Rt", ""); IStatsCollector stats = (IStatsCollector)client; diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index 1812c08d2a..c4db5da2da 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs @@ -256,9 +256,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP public string GetStats() { return string.Format( - "{0,9} {1,10} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7} {9,7}", + "{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}", PacketsSent, PacketsReceived, + UnackedBytes, m_throttleCategories[(int)ThrottleOutPacketType.Resend].Content, m_throttleCategories[(int)ThrottleOutPacketType.Land].Content, m_throttleCategories[(int)ThrottleOutPacketType.Wind].Content,