From ac7bc78555c1dd51724790032f0711b24bc8c67d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 8 Feb 2011 12:06:14 -0800 Subject: Added emergency monitoring of UDP Outgoing packets thread. Just type "emergency-monitoring on/off" --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 30 ++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent/UDP') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 6630edb..53cebb2 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -95,7 +95,15 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "Show throttle settings for each client and for the server overall", "Without the 'full' option, only root agents are shown." + " With the 'full' option child agents are also shown.", - ShowThrottlesReport); + ShowThrottlesReport); + + scene.AddCommand( + this, "emergency-monitoring", + "Go on/off emergency monitoring mode", + "Go on/off emergency monitoring mode", + "Go on/off emergency monitoring mode", + EmergencyMonitoring); + } public void RemoveRegion(Scene scene) @@ -120,7 +128,25 @@ namespace OpenSim.Region.CoreModules.UDP.Linden { MainConsole.Instance.Output(GetThrottlesReport(cmd)); } - + + protected void EmergencyMonitoring(string module, string[] cmd) + { + bool mode = true; + if (cmd.Length == 1 || (cmd.Length > 1 && cmd[1] == "on")) + { + mode = true; + MainConsole.Instance.Output("Emergency Monitoring ON"); + } + else + { + mode = false; + MainConsole.Instance.Output("Emergency Monitoring OFF"); + } + + foreach (Scene s in m_scenes.Values) + s.EmergencyMonitoring = mode; + } + protected string GetColumnEntry(string entry, int maxLength, int columnPadding) { return string.Format( -- cgit v1.1 From 473fac4dc71858139bd44c1e9ce4fd03d9d1bd91 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 9 Feb 2011 08:06:20 -0800 Subject: Detect negative dripAmounts in TokenBuckets. These negatives result from overflown integer operations. Also added Total to the scene throttles in show throttles. --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent/UDP') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 53cebb2..dfeecb1 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -361,7 +361,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden ThrottleRates throttleRates = udpServer.ThrottleRates; report.AppendFormat( "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", - "n/a", + (throttleRates.Total * 8) / 1000, (throttleRates.ResendLimit * 8) / 1000, (throttleRates.LandLimit * 8) / 1000, (throttleRates.WindLimit * 8) / 1000, -- cgit v1.1