diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 56 |
1 files changed, 42 insertions, 14 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 87d067c..dfeecb1 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 | |||
95 | "Show throttle settings for each client and for the server overall", | 95 | "Show throttle settings for each client and for the server overall", |
96 | "Without the 'full' option, only root agents are shown." | 96 | "Without the 'full' option, only root agents are shown." |
97 | + " With the 'full' option child agents are also shown.", | 97 | + " With the 'full' option child agents are also shown.", |
98 | ShowThrottlesReport); | 98 | ShowThrottlesReport); |
99 | |||
100 | scene.AddCommand( | ||
101 | this, "emergency-monitoring", | ||
102 | "Go on/off emergency monitoring mode", | ||
103 | "Go on/off emergency monitoring mode", | ||
104 | "Go on/off emergency monitoring mode", | ||
105 | EmergencyMonitoring); | ||
106 | |||
99 | } | 107 | } |
100 | 108 | ||
101 | public void RemoveRegion(Scene scene) | 109 | public void RemoveRegion(Scene scene) |
@@ -120,7 +128,25 @@ namespace OpenSim.Region.CoreModules.UDP.Linden | |||
120 | { | 128 | { |
121 | MainConsole.Instance.Output(GetThrottlesReport(cmd)); | 129 | MainConsole.Instance.Output(GetThrottlesReport(cmd)); |
122 | } | 130 | } |
123 | 131 | ||
132 | protected void EmergencyMonitoring(string module, string[] cmd) | ||
133 | { | ||
134 | bool mode = true; | ||
135 | if (cmd.Length == 1 || (cmd.Length > 1 && cmd[1] == "on")) | ||
136 | { | ||
137 | mode = true; | ||
138 | MainConsole.Instance.Output("Emergency Monitoring ON"); | ||
139 | } | ||
140 | else | ||
141 | { | ||
142 | mode = false; | ||
143 | MainConsole.Instance.Output("Emergency Monitoring OFF"); | ||
144 | } | ||
145 | |||
146 | foreach (Scene s in m_scenes.Values) | ||
147 | s.EmergencyMonitoring = mode; | ||
148 | } | ||
149 | |||
124 | protected string GetColumnEntry(string entry, int maxLength, int columnPadding) | 150 | protected string GetColumnEntry(string entry, int maxLength, int columnPadding) |
125 | { | 151 | { |
126 | return string.Format( | 152 | return string.Format( |
@@ -154,24 +180,26 @@ namespace OpenSim.Region.CoreModules.UDP.Linden | |||
154 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); | 180 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); |
155 | 181 | ||
156 | report.AppendFormat( | 182 | report.AppendFormat( |
157 | "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", | 183 | "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n", |
158 | "Pkts", | 184 | "Pkts", |
159 | "Pkts", | 185 | "Pkts", |
186 | "Pkts", | ||
160 | "Bytes", | 187 | "Bytes", |
161 | "Pkts", | 188 | "Q Pkts", |
162 | "Pkts", | 189 | "Q Pkts", |
163 | "Pkts", | 190 | "Q Pkts", |
164 | "Pkts", | 191 | "Q Pkts", |
165 | "Pkts", | 192 | "Q Pkts", |
166 | "Pkts", | 193 | "Q Pkts", |
167 | "Pkts", | 194 | "Q Pkts", |
168 | "Pkts"); | 195 | "Q Pkts"); |
169 | 196 | ||
170 | report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); | 197 | report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); |
171 | report.AppendFormat( | 198 | report.AppendFormat( |
172 | "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", | 199 | "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n", |
173 | "Out", | ||
174 | "In", | 200 | "In", |
201 | "Out", | ||
202 | "Resent", | ||
175 | "Unacked", | 203 | "Unacked", |
176 | "Resend", | 204 | "Resend", |
177 | "Land", | 205 | "Land", |
@@ -333,7 +361,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden | |||
333 | ThrottleRates throttleRates = udpServer.ThrottleRates; | 361 | ThrottleRates throttleRates = udpServer.ThrottleRates; |
334 | report.AppendFormat( | 362 | report.AppendFormat( |
335 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", | 363 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", |
336 | "n/a", | 364 | (throttleRates.Total * 8) / 1000, |
337 | (throttleRates.ResendLimit * 8) / 1000, | 365 | (throttleRates.ResendLimit * 8) / 1000, |
338 | (throttleRates.LandLimit * 8) / 1000, | 366 | (throttleRates.LandLimit * 8) / 1000, |
339 | (throttleRates.WindLimit * 8) / 1000, | 367 | (throttleRates.WindLimit * 8) / 1000, |