diff options
Diffstat (limited to 'OpenSim/Framework/Monitoring/ServerStatsCollector.cs')
-rw-r--r-- | OpenSim/Framework/Monitoring/ServerStatsCollector.cs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs index 0ab4b93..07ca14b 100644 --- a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs | |||
@@ -114,10 +114,15 @@ namespace OpenSim.Framework.Monitoring | |||
114 | 114 | ||
115 | private void MakeStat(string pName, string pDesc, string pUnit, string pContainer, Action<Stat> act) | 115 | private void MakeStat(string pName, string pDesc, string pUnit, string pContainer, Action<Stat> act) |
116 | { | 116 | { |
117 | MakeStat(pName, pDesc, pUnit, pContainer, act, MeasuresOfInterest.None); | ||
118 | } | ||
119 | |||
120 | private void MakeStat(string pName, string pDesc, string pUnit, string pContainer, Action<Stat> act, MeasuresOfInterest moi) | ||
121 | { | ||
117 | string desc = pDesc; | 122 | string desc = pDesc; |
118 | if (desc == null) | 123 | if (desc == null) |
119 | desc = pName; | 124 | desc = pName; |
120 | Stat stat = new Stat(pName, pName, desc, pUnit, CategoryServer, pContainer, StatType.Pull, act, StatVerbosity.Debug); | 125 | Stat stat = new Stat(pName, pName, desc, pUnit, CategoryServer, pContainer, StatType.Pull, moi, act, StatVerbosity.Debug); |
121 | StatsManager.RegisterStat(stat); | 126 | StatsManager.RegisterStat(stat); |
122 | RegisteredStats.Add(pName, stat); | 127 | RegisteredStats.Add(pName, stat); |
123 | } | 128 | } |
@@ -141,7 +146,7 @@ namespace OpenSim.Framework.Monitoring | |||
141 | StatsManager.RegisterStat(tempStat); | 146 | StatsManager.RegisterStat(tempStat); |
142 | RegisteredStats.Add(tempName, tempStat); | 147 | RegisteredStats.Add(tempName, tempStat); |
143 | 148 | ||
144 | MakeStat("TotalProcessorTime", null, "sec", ContainerProcessor, | 149 | MakeStat("TotalProcessorTime", null, "sec", ContainerProcessor, |
145 | (s) => { s.Value = Process.GetCurrentProcess().TotalProcessorTime.TotalSeconds; }); | 150 | (s) => { s.Value = Process.GetCurrentProcess().TotalProcessorTime.TotalSeconds; }); |
146 | 151 | ||
147 | MakeStat("UserProcessorTime", null, "sec", ContainerProcessor, | 152 | MakeStat("UserProcessorTime", null, "sec", ContainerProcessor, |
@@ -158,7 +163,7 @@ namespace OpenSim.Framework.Monitoring | |||
158 | m_log.ErrorFormat("{0} Exception creating 'Process': {1}", LogHeader, e); | 163 | m_log.ErrorFormat("{0} Exception creating 'Process': {1}", LogHeader, e); |
159 | } | 164 | } |
160 | 165 | ||
161 | MakeStat("BuiltinThreadpoolWorkerThreadsAvailable", null, "threads", ContainerThreadpool, | 166 | MakeStat("BuiltinThreadpoolWorkerThreadsAvailable", null, "threads", ContainerThreadpool, |
162 | s => | 167 | s => |
163 | { | 168 | { |
164 | int workerThreads, iocpThreads; | 169 | int workerThreads, iocpThreads; |
@@ -166,7 +171,7 @@ namespace OpenSim.Framework.Monitoring | |||
166 | s.Value = workerThreads; | 171 | s.Value = workerThreads; |
167 | }); | 172 | }); |
168 | 173 | ||
169 | MakeStat("BuiltinThreadpoolIOCPThreadsAvailable", null, "threads", ContainerThreadpool, | 174 | MakeStat("BuiltinThreadpoolIOCPThreadsAvailable", null, "threads", ContainerThreadpool, |
170 | s => | 175 | s => |
171 | { | 176 | { |
172 | int workerThreads, iocpThreads; | 177 | int workerThreads, iocpThreads; |
@@ -184,6 +189,14 @@ namespace OpenSim.Framework.Monitoring | |||
184 | MakeStat("STPWorkItemsWaiting", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().WaitingCallbacks); | 189 | MakeStat("STPWorkItemsWaiting", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().WaitingCallbacks); |
185 | } | 190 | } |
186 | 191 | ||
192 | MakeStat( | ||
193 | "HTTPRequestsMade", | ||
194 | "Number of outbound HTTP requests made", | ||
195 | "requests", | ||
196 | ContainerNetwork, | ||
197 | s => s.Value = WebUtil.RequestNumber, | ||
198 | MeasuresOfInterest.AverageChangeOverTime); | ||
199 | |||
187 | try | 200 | try |
188 | { | 201 | { |
189 | List<string> okInterfaceTypes = new List<string>(NetworkInterfaceTypes.Split(',')); | 202 | List<string> okInterfaceTypes = new List<string>(NetworkInterfaceTypes.Split(',')); |