diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 81 |
1 files changed, 55 insertions, 26 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 0a256a1..9a5f2ed 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | |||
@@ -230,11 +230,37 @@ namespace OpenSim.Region.CoreModules.UDP.Linden | |||
230 | int columnPadding = 2; | 230 | int columnPadding = 2; |
231 | int maxNameLength = 18; | 231 | int maxNameLength = 18; |
232 | int maxRegionNameLength = 14; | 232 | int maxRegionNameLength = 14; |
233 | int maxTypeLength = 4; | 233 | int maxTypeLength = 4; |
234 | int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; | ||
234 | 235 | ||
235 | report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); | 236 | report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); |
236 | report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); | 237 | report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); |
237 | report.Append(GetColumnEntry("Type\n", maxTypeLength, columnPadding)); | 238 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); |
239 | |||
240 | report.AppendFormat( | ||
241 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", | ||
242 | "Total", | ||
243 | "Resend", | ||
244 | "Land", | ||
245 | "Wind", | ||
246 | "Cloud", | ||
247 | "Task", | ||
248 | "Texture", | ||
249 | "Asset"); | ||
250 | |||
251 | report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); | ||
252 | report.AppendFormat( | ||
253 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", | ||
254 | "kb/s", | ||
255 | "kb/s", | ||
256 | "kb/s", | ||
257 | "kb/s", | ||
258 | "kb/s", | ||
259 | "kb/s", | ||
260 | "kb/s", | ||
261 | "kb/s"); | ||
262 | |||
263 | report.AppendLine(); | ||
238 | 264 | ||
239 | bool firstClient = true; | 265 | bool firstClient = true; |
240 | 266 | ||
@@ -251,7 +277,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden | |||
251 | 277 | ||
252 | if (firstClient) | 278 | if (firstClient) |
253 | { | 279 | { |
254 | report.AppendLine(GetServerThrottlesReport(llClient.UDPServer, scene)); | 280 | report.AppendLine(GetServerThrottlesReport(llClient.UDPServer)); |
255 | firstClient = false; | 281 | firstClient = false; |
256 | } | 282 | } |
257 | 283 | ||
@@ -268,15 +294,17 @@ namespace OpenSim.Region.CoreModules.UDP.Linden | |||
268 | report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); | 294 | report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); |
269 | report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); | 295 | report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); |
270 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); | 296 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); |
271 | 297 | ||
272 | report.Append((ci.totalThrottle * 8) / 1000 + " "); | 298 | report.AppendFormat( |
273 | report.Append((ci.resendThrottle * 8) / 1000 + " "); | 299 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", |
274 | report.Append((ci.landThrottle * 8) / 1000 + " "); | 300 | (ci.totalThrottle * 8) / 1000, |
275 | report.Append((ci.windThrottle * 8) / 1000 + " "); | 301 | (ci.resendThrottle * 8) / 1000, |
276 | report.Append((ci.cloudThrottle * 8) / 1000 + " "); | 302 | (ci.landThrottle * 8) / 1000, |
277 | report.Append((ci.taskThrottle * 8) / 1000 + " "); | 303 | (ci.windThrottle * 8) / 1000, |
278 | report.Append((ci.textureThrottle * 8) / 1000 + " "); | 304 | (ci.cloudThrottle * 8) / 1000, |
279 | report.Append((ci.assetThrottle * 8) / 1000 + " "); | 305 | (ci.taskThrottle * 8) / 1000, |
306 | (ci.textureThrottle * 8) / 1000, | ||
307 | (ci.assetThrottle * 8) / 1000); | ||
280 | 308 | ||
281 | report.AppendLine(); | 309 | report.AppendLine(); |
282 | } | 310 | } |
@@ -287,31 +315,32 @@ namespace OpenSim.Region.CoreModules.UDP.Linden | |||
287 | return report.ToString(); | 315 | return report.ToString(); |
288 | } | 316 | } |
289 | 317 | ||
290 | protected string GetServerThrottlesReport(LLUDPServer udpServer, Scene scene) | 318 | protected string GetServerThrottlesReport(LLUDPServer udpServer) |
291 | { | 319 | { |
292 | StringBuilder report = new StringBuilder(); | 320 | StringBuilder report = new StringBuilder(); |
293 | 321 | ||
294 | int columnPadding = 2; | 322 | int columnPadding = 2; |
295 | int maxNameLength = 18; | 323 | int maxNameLength = 18; |
296 | int maxRegionNameLength = 14; | 324 | int maxRegionNameLength = 14; |
297 | int maxTypeLength = 4; | 325 | int maxTypeLength = 4; |
298 | 326 | ||
299 | string name = "SERVER LIMITS"; | 327 | string name = "SERVER AGENT LIMITS"; |
300 | string regionName = scene.RegionInfo.RegionName; | ||
301 | 328 | ||
302 | report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); | 329 | report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); |
303 | report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); | 330 | report.Append(GetColumnEntry("-", maxRegionNameLength, columnPadding)); |
304 | report.Append(GetColumnEntry("n/a", maxTypeLength, columnPadding)); | 331 | report.Append(GetColumnEntry("-", maxTypeLength, columnPadding)); |
305 | 332 | ||
306 | ThrottleRates throttleRates = udpServer.ThrottleRates; | 333 | ThrottleRates throttleRates = udpServer.ThrottleRates; |
307 | report.Append("n/a "); | 334 | report.AppendFormat( |
308 | report.Append((throttleRates.ResendLimit * 8) / 1000 + " "); | 335 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", |
309 | report.Append((throttleRates.LandLimit * 8) / 1000 + " "); | 336 | "n/a", |
310 | report.Append((throttleRates.WindLimit * 8) / 1000 + " "); | 337 | (throttleRates.ResendLimit * 8) / 1000, |
311 | report.Append((throttleRates.CloudLimit * 8) / 1000 + " "); | 338 | (throttleRates.LandLimit * 8) / 1000, |
312 | report.Append((throttleRates.TaskLimit * 8) / 1000 + " "); | 339 | (throttleRates.WindLimit * 8) / 1000, |
313 | report.Append((throttleRates.TextureLimit * 8) / 1000 + " "); | 340 | (throttleRates.CloudLimit * 8) / 1000, |
314 | report.Append((throttleRates.AssetLimit * 8) / 1000 + " "); | 341 | (throttleRates.TaskLimit * 8) / 1000, |
342 | (throttleRates.TextureLimit * 8) / 1000, | ||
343 | (throttleRates.AssetLimit * 8) / 1000); | ||
315 | 344 | ||
316 | return report.ToString(); | 345 | return report.ToString(); |
317 | } | 346 | } |