diff options
author | Justin Clark-Casey (justincc) | 2014-10-06 22:18:54 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-11-25 23:18:39 +0000 |
commit | a5eabdade3498d41d600043fe15d62905bec24be (patch) | |
tree | c6507c57ffc38b092852bec09a80fc7de24d75b4 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | |
parent | Add "show server throttles" command for showing server specific information a... (diff) | |
download | opensim-SC_OLD-a5eabdade3498d41d600043fe15d62905bec24be.zip opensim-SC_OLD-a5eabdade3498d41d600043fe15d62905bec24be.tar.gz opensim-SC_OLD-a5eabdade3498d41d600043fe15d62905bec24be.tar.bz2 opensim-SC_OLD-a5eabdade3498d41d600043fe15d62905bec24be.tar.xz |
Move information about "server agent rate" throttles into "show server throttles" command rather than "show throttles"
THis allows us to see the rates when no client is connected to the region.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs index 354a47d..438331a 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | ||
30 | using NDesk.Options; | 31 | using NDesk.Options; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
@@ -174,6 +175,62 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
174 | m_udpServer.MaxTotalDripRate != 0 ? string.Format("{0} kbit", m_udpServer.MaxTotalDripRate / 8 / 1000) : "unset"); | 175 | m_udpServer.MaxTotalDripRate != 0 ? string.Format("{0} kbit", m_udpServer.MaxTotalDripRate / 8 / 1000) : "unset"); |
175 | 176 | ||
176 | m_console.Output(cdl.ToString()); | 177 | m_console.Output(cdl.ToString()); |
178 | |||
179 | m_console.OutputFormat("{0}\n", GetServerThrottlesReport(m_udpServer)); | ||
180 | } | ||
181 | |||
182 | private string GetServerThrottlesReport(LLUDPServer udpServer) | ||
183 | { | ||
184 | StringBuilder report = new StringBuilder(); | ||
185 | |||
186 | report.AppendFormat( | ||
187 | "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}\n", | ||
188 | "Max", | ||
189 | "Total", | ||
190 | "Resend", | ||
191 | "Land", | ||
192 | "Wind", | ||
193 | "Cloud", | ||
194 | "Task", | ||
195 | "Texture", | ||
196 | "Asset"); | ||
197 | |||
198 | report.AppendFormat( | ||
199 | "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}\n", | ||
200 | "kb/s", | ||
201 | "kb/s", | ||
202 | "kb/s", | ||
203 | "kb/s", | ||
204 | "kb/s", | ||
205 | "kb/s", | ||
206 | "kb/s", | ||
207 | "kb/s", | ||
208 | "kb/s"); | ||
209 | |||
210 | report.AppendLine(); | ||
211 | |||
212 | ThrottleRates throttleRates = udpServer.ThrottleRates; | ||
213 | report.AppendFormat( | ||
214 | "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}", | ||
215 | "-", | ||
216 | (throttleRates.Total * 8) / 1000, | ||
217 | (throttleRates.Resend * 8) / 1000, | ||
218 | (throttleRates.Land * 8) / 1000, | ||
219 | (throttleRates.Wind * 8) / 1000, | ||
220 | (throttleRates.Cloud * 8) / 1000, | ||
221 | (throttleRates.Task * 8) / 1000, | ||
222 | (throttleRates.Texture * 8) / 1000, | ||
223 | (throttleRates.Asset * 8) / 1000); | ||
224 | |||
225 | return report.ToString(); | ||
226 | } | ||
227 | |||
228 | protected string GetColumnEntry(string entry, int maxLength, int columnPadding) | ||
229 | { | ||
230 | return string.Format( | ||
231 | "{0,-" + maxLength + "}{1,-" + columnPadding + "}", | ||
232 | entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, | ||
233 | ""); | ||
177 | } | 234 | } |
178 | 235 | ||
179 | private void HandleDataCommand(string module, string[] args) | 236 | private void HandleDataCommand(string module, string[] args) |