diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 071530b..3be5a07 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | |||
@@ -52,48 +52,48 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
52 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")] | 52 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")] |
53 | public class LindenUDPInfoModule : ISharedRegionModule | 53 | public class LindenUDPInfoModule : ISharedRegionModule |
54 | { | 54 | { |
55 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 55 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
56 | 56 | ||
57 | protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); | 57 | protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); |
58 | 58 | ||
59 | public string Name { get { return "Linden UDP Module"; } } | 59 | public string Name { get { return "Linden UDP Module"; } } |
60 | 60 | ||
61 | public Type ReplaceableInterface { get { return null; } } | 61 | public Type ReplaceableInterface { get { return null; } } |
62 | 62 | ||
63 | public void Initialise(IConfigSource source) | 63 | public void Initialise(IConfigSource source) |
64 | { | 64 | { |
65 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: INITIALIZED MODULE"); | 65 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: INITIALIZED MODULE"); |
66 | } | 66 | } |
67 | 67 | ||
68 | public void PostInitialise() | 68 | public void PostInitialise() |
69 | { | 69 | { |
70 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: POST INITIALIZED MODULE"); | 70 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: POST INITIALIZED MODULE"); |
71 | } | 71 | } |
72 | 72 | ||
73 | public void Close() | 73 | public void Close() |
74 | { | 74 | { |
75 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: CLOSED MODULE"); | 75 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: CLOSED MODULE"); |
76 | } | 76 | } |
77 | 77 | ||
78 | public void AddRegion(Scene scene) | 78 | public void AddRegion(Scene scene) |
79 | { | 79 | { |
80 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); | 80 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); |
81 | 81 | ||
82 | lock (m_scenes) | 82 | lock (m_scenes) |
83 | m_scenes[scene.RegionInfo.RegionID] = scene; | 83 | m_scenes[scene.RegionInfo.RegionID] = scene; |
84 | 84 | ||
85 | scene.AddCommand( | 85 | scene.AddCommand( |
86 | "Comms", this, "show pqueues", | 86 | "Comms", this, "show pqueues", |
87 | "show pqueues [full]", | 87 | "show pqueues [full]", |
88 | "Show priority queue data for each client", | 88 | "Show priority queue data for each client", |
89 | "Without the 'full' option, only root agents are shown." | 89 | "Without the 'full' option, only root agents are shown." |
90 | + " With the 'full' option child agents are also shown.", | 90 | + " With the 'full' option child agents are also shown.", |
91 | (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd))); | 91 | (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd))); |
92 | 92 | ||
93 | scene.AddCommand( | 93 | scene.AddCommand( |
94 | "Comms", this, "show queues", | 94 | "Comms", this, "show queues", |
95 | "show queues [full]", | 95 | "show queues [full]", |
96 | "Show queue data for each client", | 96 | "Show queue data for each client", |
97 | "Without the 'full' option, only root agents are shown.\n" | 97 | "Without the 'full' option, only root agents are shown.\n" |
98 | + "With the 'full' option child agents are also shown.\n\n" | 98 | + "With the 'full' option child agents are also shown.\n\n" |
99 | + "Type - Rt is a root (avatar) client whilst cd is a child (neighbour interacting) client.\n" | 99 | + "Type - Rt is a root (avatar) client whilst cd is a child (neighbour interacting) client.\n" |
@@ -116,13 +116,13 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
116 | "clear image queues <first-name> <last-name>", | 116 | "clear image queues <first-name> <last-name>", |
117 | "Clear the image queues (textures downloaded via UDP) for a particular client.", | 117 | "Clear the image queues (textures downloaded via UDP) for a particular client.", |
118 | (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); | 118 | (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); |
119 | 119 | ||
120 | scene.AddCommand( | 120 | scene.AddCommand( |
121 | "Comms", this, "show throttles", | 121 | "Comms", this, "show throttles", |
122 | "show throttles [full]", | 122 | "show throttles [full]", |
123 | "Show throttle settings for each client and for the server overall", | 123 | "Show throttle settings for each client and for the server overall", |
124 | "Without the 'full' option, only root agents are shown." | 124 | "Without the 'full' option, only root agents are shown." |
125 | + " With the 'full' option child agents are also shown.", | 125 | + " With the 'full' option child agents are also shown.", |
126 | (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); | 126 | (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); |
127 | 127 | ||
128 | scene.AddCommand( | 128 | scene.AddCommand( |
@@ -134,15 +134,15 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
134 | (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); | 134 | (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); |
135 | 135 | ||
136 | } | 136 | } |
137 | 137 | ||
138 | public void RemoveRegion(Scene scene) | 138 | public void RemoveRegion(Scene scene) |
139 | { | 139 | { |
140 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); | 140 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); |
141 | 141 | ||
142 | lock (m_scenes) | 142 | lock (m_scenes) |
143 | m_scenes.Remove(scene.RegionInfo.RegionID); | 143 | m_scenes.Remove(scene.RegionInfo.RegionID); |
144 | } | 144 | } |
145 | 145 | ||
146 | public void RegionLoaded(Scene scene) | 146 | public void RegionLoaded(Scene scene) |
147 | { | 147 | { |
148 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); | 148 | // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); |
@@ -176,7 +176,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
176 | foreach (ScenePresence agent in foundAgents) | 176 | foreach (ScenePresence agent in foundAgents) |
177 | { | 177 | { |
178 | LLClientView client = agent.ControllingClient as LLClientView; | 178 | LLClientView client = agent.ControllingClient as LLClientView; |
179 | 179 | ||
180 | if (client == null) | 180 | if (client == null) |
181 | return "This command is only supported for LLClientView"; | 181 | return "This command is only supported for LLClientView"; |
182 | 182 | ||
@@ -191,10 +191,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
191 | } | 191 | } |
192 | 192 | ||
193 | protected string GetColumnEntry(string entry, int maxLength, int columnPadding) | 193 | protected string GetColumnEntry(string entry, int maxLength, int columnPadding) |
194 | { | 194 | { |
195 | return string.Format( | 195 | return string.Format( |
196 | "{0,-" + maxLength + "}{1,-" + columnPadding + "}", | 196 | "{0,-" + maxLength + "}{1,-" + columnPadding + "}", |
197 | entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, | 197 | entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, |
198 | ""); | 198 | ""); |
199 | } | 199 | } |
200 | 200 | ||
@@ -207,29 +207,29 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
207 | { | 207 | { |
208 | bool showChildren = false; | 208 | bool showChildren = false; |
209 | string pname = ""; | 209 | string pname = ""; |
210 | 210 | ||
211 | if (showParams.Length > 2 && showParams[2] == "full") | 211 | if (showParams.Length > 2 && showParams[2] == "full") |
212 | showChildren = true; | 212 | showChildren = true; |
213 | else if (showParams.Length > 3) | 213 | else if (showParams.Length > 3) |
214 | pname = showParams[2] + " " + showParams[3]; | 214 | pname = showParams[2] + " " + showParams[3]; |
215 | 215 | ||
216 | StringBuilder report = new StringBuilder(); | 216 | StringBuilder report = new StringBuilder(); |
217 | 217 | ||
218 | int columnPadding = 2; | 218 | int columnPadding = 2; |
219 | int maxNameLength = 18; | 219 | int maxNameLength = 18; |
220 | int maxRegionNameLength = 14; | 220 | int maxRegionNameLength = 14; |
221 | int maxTypeLength = 4; | 221 | int maxTypeLength = 4; |
222 | // int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; | 222 | // int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; |
223 | 223 | ||
224 | report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); | 224 | report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); |
225 | report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); | 225 | report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); |
226 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); | 226 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); |
227 | 227 | ||
228 | report.AppendFormat( | 228 | report.AppendFormat( |
229 | "{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7} {10,7} {11,7}\n", | 229 | "{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7} {10,7} {11,7}\n", |
230 | "Pri 0", | 230 | "Pri 0", |
231 | "Pri 1", | 231 | "Pri 1", |
232 | "Pri 2", | 232 | "Pri 2", |
233 | "Pri 3", | 233 | "Pri 3", |
234 | "Pri 4", | 234 | "Pri 4", |
235 | "Pri 5", | 235 | "Pri 5", |
@@ -252,16 +252,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
252 | bool isChild = client.SceneAgent.IsChildAgent; | 252 | bool isChild = client.SceneAgent.IsChildAgent; |
253 | if (isChild && !showChildren) | 253 | if (isChild && !showChildren) |
254 | return; | 254 | return; |
255 | 255 | ||
256 | string name = client.Name; | 256 | string name = client.Name; |
257 | if (pname != "" && name != pname) | 257 | if (pname != "" && name != pname) |
258 | return; | 258 | return; |
259 | 259 | ||
260 | string regionName = scene.RegionInfo.RegionName; | 260 | string regionName = scene.RegionInfo.RegionName; |
261 | 261 | ||
262 | report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); | 262 | report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); |
263 | report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); | 263 | report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); |
264 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); | 264 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); |
265 | report.AppendLine(((LLClientView)client).EntityUpdateQueue.ToString()); | 265 | report.AppendLine(((LLClientView)client).EntityUpdateQueue.ToString()); |
266 | } | 266 | } |
267 | }); | 267 | }); |
@@ -306,17 +306,17 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
306 | foreach (ScenePresence agent in foundAgents) | 306 | foreach (ScenePresence agent in foundAgents) |
307 | { | 307 | { |
308 | LLClientView client = agent.ControllingClient as LLClientView; | 308 | LLClientView client = agent.ControllingClient as LLClientView; |
309 | 309 | ||
310 | if (client == null) | 310 | if (client == null) |
311 | return "This command is only supported for LLClientView"; | 311 | return "This command is only supported for LLClientView"; |
312 | 312 | ||
313 | J2KImage[] images = client.ImageManager.GetImages(); | 313 | J2KImage[] images = client.ImageManager.GetImages(); |
314 | 314 | ||
315 | report.AppendFormat( | 315 | report.AppendFormat( |
316 | "In region {0} ({1} agent)\n", | 316 | "In region {0} ({1} agent)\n", |
317 | agent.Scene.RegionInfo.RegionName, agent.IsChildAgent ? "child" : "root"); | 317 | agent.Scene.RegionInfo.RegionName, agent.IsChildAgent ? "child" : "root"); |
318 | report.AppendFormat("Images in queue: {0}\n", images.Length); | 318 | report.AppendFormat("Images in queue: {0}\n", images.Length); |
319 | 319 | ||
320 | if (images.Length > 0) | 320 | if (images.Length > 0) |
321 | { | 321 | { |
322 | report.AppendFormat( | 322 | report.AppendFormat( |
@@ -327,7 +327,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
327 | "Start Pkt", | 327 | "Start Pkt", |
328 | "Has Asset", | 328 | "Has Asset", |
329 | "Decoded"); | 329 | "Decoded"); |
330 | 330 | ||
331 | foreach (J2KImage image in images) | 331 | foreach (J2KImage image in images) |
332 | report.AppendFormat( | 332 | report.AppendFormat( |
333 | "{0,36} {1,8} {2,10} {3,10} {4,9} {5,7}\n", | 333 | "{0,36} {1,8} {2,10} {3,10} {4,9} {5,7}\n", |
@@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
337 | 337 | ||
338 | return report.ToString(); | 338 | return report.ToString(); |
339 | } | 339 | } |
340 | 340 | ||
341 | /// <summary> | 341 | /// <summary> |
342 | /// Generate UDP Queue data report for each client | 342 | /// Generate UDP Queue data report for each client |
343 | /// </summary> | 343 | /// </summary> |
@@ -347,16 +347,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
347 | { | 347 | { |
348 | bool showChildren = false; | 348 | bool showChildren = false; |
349 | string pname = ""; | 349 | string pname = ""; |
350 | 350 | ||
351 | if (showParams.Length > 2 && showParams[2] == "full") | 351 | if (showParams.Length > 2 && showParams[2] == "full") |
352 | showChildren = true; | 352 | showChildren = true; |
353 | else if (showParams.Length > 3) | 353 | else if (showParams.Length > 3) |
354 | pname = showParams[2] + " " + showParams[3]; | 354 | pname = showParams[2] + " " + showParams[3]; |
355 | 355 | ||
356 | StringBuilder report = new StringBuilder(); | 356 | StringBuilder report = new StringBuilder(); |
357 | 357 | ||
358 | int columnPadding = 2; | 358 | int columnPadding = 2; |
359 | int maxNameLength = 18; | 359 | int maxNameLength = 18; |
360 | int maxRegionNameLength = 14; | 360 | int maxRegionNameLength = 14; |
361 | int maxTypeLength = 4; | 361 | int maxTypeLength = 4; |
362 | 362 | ||
@@ -364,11 +364,11 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
364 | = maxNameLength + columnPadding | 364 | = maxNameLength + columnPadding |
365 | + maxRegionNameLength + columnPadding | 365 | + maxRegionNameLength + columnPadding |
366 | + maxTypeLength + columnPadding; | 366 | + maxTypeLength + columnPadding; |
367 | 367 | ||
368 | report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); | 368 | report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); |
369 | report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); | 369 | report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); |
370 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); | 370 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); |
371 | 371 | ||
372 | report.AppendFormat( | 372 | report.AppendFormat( |
373 | "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", | 373 | "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", |
374 | "Since", | 374 | "Since", |
@@ -383,7 +383,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
383 | "Q Pkts", | 383 | "Q Pkts", |
384 | "Q Pkts", | 384 | "Q Pkts", |
385 | "Q Pkts"); | 385 | "Q Pkts"); |
386 | 386 | ||
387 | report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); | 387 | report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); |
388 | report.AppendFormat( | 388 | report.AppendFormat( |
389 | "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", | 389 | "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", |
@@ -398,8 +398,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
398 | "Cloud", | 398 | "Cloud", |
399 | "Task", | 399 | "Task", |
400 | "Texture", | 400 | "Texture", |
401 | "Asset"); | 401 | "Asset"); |
402 | 402 | ||
403 | lock (m_scenes) | 403 | lock (m_scenes) |
404 | { | 404 | { |
405 | foreach (Scene scene in m_scenes.Values) | 405 | foreach (Scene scene in m_scenes.Values) |
@@ -413,7 +413,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
413 | bool isChild = client.SceneAgent.IsChildAgent; | 413 | bool isChild = client.SceneAgent.IsChildAgent; |
414 | if (isChild && !showChildren) | 414 | if (isChild && !showChildren) |
415 | return; | 415 | return; |
416 | 416 | ||
417 | string name = client.Name; | 417 | string name = client.Name; |
418 | if (pname != "" && name != pname) | 418 | if (pname != "" && name != pname) |
419 | return; | 419 | return; |
@@ -424,7 +424,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
424 | report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); | 424 | report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); |
425 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); | 425 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); |
426 | 426 | ||
427 | IStatsCollector stats = (IStatsCollector)client; | 427 | IStatsCollector stats = (IStatsCollector)client; |
428 | report.AppendLine(stats.Report()); | 428 | report.AppendLine(stats.Report()); |
429 | } | 429 | } |
430 | }); | 430 | }); |
@@ -432,8 +432,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
432 | } | 432 | } |
433 | 433 | ||
434 | return report.ToString(); | 434 | return report.ToString(); |
435 | } | 435 | } |
436 | 436 | ||
437 | /// <summary> | 437 | /// <summary> |
438 | /// Show throttle data | 438 | /// Show throttle data |
439 | /// </summary> | 439 | /// </summary> |
@@ -443,28 +443,28 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
443 | { | 443 | { |
444 | bool showChildren = false; | 444 | bool showChildren = false; |
445 | string pname = ""; | 445 | string pname = ""; |
446 | 446 | ||
447 | if (showParams.Length > 2 && showParams[2] == "full") | 447 | if (showParams.Length > 2 && showParams[2] == "full") |
448 | showChildren = true; | 448 | showChildren = true; |
449 | else if (showParams.Length > 3) | 449 | else if (showParams.Length > 3) |
450 | pname = showParams[2] + " " + showParams[3]; | 450 | pname = showParams[2] + " " + showParams[3]; |
451 | 451 | ||
452 | StringBuilder report = new StringBuilder(); | 452 | StringBuilder report = new StringBuilder(); |
453 | 453 | ||
454 | int columnPadding = 2; | 454 | int columnPadding = 2; |
455 | int maxNameLength = 18; | 455 | int maxNameLength = 18; |
456 | int maxRegionNameLength = 14; | 456 | int maxRegionNameLength = 14; |
457 | int maxTypeLength = 4; | 457 | int maxTypeLength = 4; |
458 | int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; | 458 | int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; |
459 | 459 | ||
460 | report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); | 460 | report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); |
461 | report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); | 461 | report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); |
462 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); | 462 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); |
463 | 463 | ||
464 | report.AppendFormat( | 464 | report.AppendFormat( |
465 | "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", | 465 | "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", |
466 | "Max", | 466 | "Max", |
467 | "Target", | 467 | "Target", |
468 | "Actual", | 468 | "Actual", |
469 | "Resend", | 469 | "Resend", |
470 | "Land", | 470 | "Land", |
@@ -472,8 +472,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
472 | "Cloud", | 472 | "Cloud", |
473 | "Task", | 473 | "Task", |
474 | "Texture", | 474 | "Texture", |
475 | "Asset"); | 475 | "Asset"); |
476 | 476 | ||
477 | report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); | 477 | report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); |
478 | report.AppendFormat( | 478 | report.AppendFormat( |
479 | "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", | 479 | "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", |
@@ -486,10 +486,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
486 | "kb/s", | 486 | "kb/s", |
487 | "kb/s", | 487 | "kb/s", |
488 | "kb/s", | 488 | "kb/s", |
489 | "kb/s"); | 489 | "kb/s"); |
490 | 490 | ||
491 | report.AppendLine(); | 491 | report.AppendLine(); |
492 | 492 | ||
493 | lock (m_scenes) | 493 | lock (m_scenes) |
494 | { | 494 | { |
495 | foreach (Scene scene in m_scenes.Values) | 495 | foreach (Scene scene in m_scenes.Values) |
@@ -504,25 +504,25 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
504 | bool isChild = client.SceneAgent.IsChildAgent; | 504 | bool isChild = client.SceneAgent.IsChildAgent; |
505 | if (isChild && !showChildren) | 505 | if (isChild && !showChildren) |
506 | return; | 506 | return; |
507 | 507 | ||
508 | string name = client.Name; | 508 | string name = client.Name; |
509 | if (pname != "" && name != pname) | 509 | if (pname != "" && name != pname) |
510 | return; | 510 | return; |
511 | 511 | ||
512 | string regionName = scene.RegionInfo.RegionName; | 512 | string regionName = scene.RegionInfo.RegionName; |
513 | 513 | ||
514 | LLUDPClient llUdpClient = llClient.UDPClient; | 514 | LLUDPClient llUdpClient = llClient.UDPClient; |
515 | ClientInfo ci = llUdpClient.GetClientInfo(); | 515 | ClientInfo ci = llUdpClient.GetClientInfo(); |
516 | 516 | ||
517 | report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); | 517 | report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); |
518 | report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); | 518 | report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); |
519 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); | 519 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); |
520 | 520 | ||
521 | report.AppendFormat( | 521 | report.AppendFormat( |
522 | "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", | 522 | "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", |
523 | ci.maxThrottle > 0 ? ((ci.maxThrottle * 8) / 1000).ToString() : "-", | 523 | ci.maxThrottle > 0 ? ((ci.maxThrottle * 8) / 1000).ToString() : "-", |
524 | llUdpClient.FlowThrottle.AdaptiveEnabled | 524 | llUdpClient.FlowThrottle.AdaptiveEnabled |
525 | ? ((ci.targetThrottle * 8) / 1000).ToString() | 525 | ? ((ci.targetThrottle * 8) / 1000).ToString() |
526 | : (llUdpClient.FlowThrottle.TotalDripRequest * 8 / 1000).ToString(), | 526 | : (llUdpClient.FlowThrottle.TotalDripRequest * 8 / 1000).ToString(), |
527 | (ci.totalThrottle * 8) / 1000, | 527 | (ci.totalThrottle * 8) / 1000, |
528 | (ci.resendThrottle * 8) / 1000, | 528 | (ci.resendThrottle * 8) / 1000, |
@@ -538,7 +538,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
538 | } | 538 | } |
539 | 539 | ||
540 | return report.ToString(); | 540 | return report.ToString(); |
541 | } | 541 | } |
542 | 542 | ||
543 | /// <summary> | 543 | /// <summary> |
544 | /// Show client stats data | 544 | /// Show client stats data |
@@ -568,20 +568,20 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
568 | string childAgentStatus; | 568 | string childAgentStatus; |
569 | 569 | ||
570 | if (llClient.SceneAgent != null) | 570 | if (llClient.SceneAgent != null) |
571 | childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y"; | 571 | childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y"; |
572 | else | 572 | else |
573 | childAgentStatus = "Off!"; | 573 | childAgentStatus = "Off!"; |
574 | 574 | ||
575 | m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", | 575 | m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", |
576 | scene.RegionInfo.RegionName, llClient.Name, | 576 | scene.RegionInfo.RegionName, llClient.Name, |
577 | childAgentStatus, | 577 | childAgentStatus, |
578 | (DateTime.Now - cinfo.StartedTime).Minutes, | 578 | (DateTime.Now - cinfo.StartedTime).Minutes, |
579 | avg_reqs, | 579 | avg_reqs, |
580 | string.Format( | 580 | string.Format( |
581 | "{0} ({1:0.00}%)", | 581 | "{0} ({1:0.00}%)", |
582 | llClient.TotalAgentUpdates, | 582 | llClient.TotalAgentUpdates, |
583 | cinfo.SyncRequests.ContainsKey("AgentUpdate") | 583 | cinfo.SyncRequests.ContainsKey("AgentUpdate") |
584 | ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 | 584 | ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 |
585 | : 0)); | 585 | : 0)); |
586 | } | 586 | } |
587 | }); | 587 | }); |