diff options
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r-- | OpenSim/Grid/AssetServer/Main.cs | 11 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 12 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 8 |
3 files changed, 21 insertions, 10 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 4fc66f7..1e0dced 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs | |||
@@ -53,7 +53,7 @@ namespace OpenSim.Grid.AssetServer | |||
53 | 53 | ||
54 | private IAssetProvider m_assetProvider; | 54 | private IAssetProvider m_assetProvider; |
55 | 55 | ||
56 | private AssetStatsReporter stats; | 56 | protected AssetStatsReporter m_stats; |
57 | 57 | ||
58 | [STAThread] | 58 | [STAThread] |
59 | public static void Main(string[] args) | 59 | public static void Main(string[] args) |
@@ -100,10 +100,9 @@ namespace OpenSim.Grid.AssetServer | |||
100 | m_console.Verbose("ASSET", "Starting HTTP process"); | 100 | m_console.Verbose("ASSET", "Starting HTTP process"); |
101 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); | 101 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); |
102 | 102 | ||
103 | // XXX Hardcoded - could be a plugin later on | 103 | m_stats = new AssetStatsReporter(); |
104 | stats = new AssetStatsReporter(); | ||
105 | 104 | ||
106 | httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider, stats)); | 105 | httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider, m_stats)); |
107 | httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider)); | 106 | httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider)); |
108 | 107 | ||
109 | httpServer.Start(); | 108 | httpServer.Start(); |
@@ -179,12 +178,12 @@ namespace OpenSim.Grid.AssetServer | |||
179 | case "help": | 178 | case "help": |
180 | m_console.Notice( | 179 | m_console.Notice( |
181 | @"shutdown - shutdown this asset server (USE CAUTION!) | 180 | @"shutdown - shutdown this asset server (USE CAUTION!) |
182 | stats - statistical information for this asset server"); | 181 | stats - statistical information for this server"); |
183 | 182 | ||
184 | break; | 183 | break; |
185 | 184 | ||
186 | case "stats": | 185 | case "stats": |
187 | MainLog.Instance.Notice("STATS", Environment.NewLine + stats.Report()); | 186 | MainLog.Instance.Notice("STATS", Environment.NewLine + m_stats.Report()); |
188 | break; | 187 | break; |
189 | 188 | ||
190 | case "shutdown": | 189 | case "shutdown": |
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index a2881e6..1ae4bee 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -34,6 +34,7 @@ using OpenSim.Framework; | |||
34 | using OpenSim.Framework.Communications.Cache; | 34 | using OpenSim.Framework.Communications.Cache; |
35 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework.Servers; | 36 | using OpenSim.Framework.Servers; |
37 | using OpenSim.Framework.Statistics; | ||
37 | 38 | ||
38 | namespace OpenSim.Grid.UserServer | 39 | namespace OpenSim.Grid.UserServer |
39 | { | 40 | { |
@@ -47,6 +48,8 @@ namespace OpenSim.Grid.UserServer | |||
47 | public UserManager m_userManager; | 48 | public UserManager m_userManager; |
48 | public UserLoginService m_loginService; | 49 | public UserLoginService m_loginService; |
49 | public MessageServersConnector m_messagesService; | 50 | public MessageServersConnector m_messagesService; |
51 | |||
52 | protected UserStatsReporter m_stats; | ||
50 | 53 | ||
51 | private LogBase m_console; | 54 | private LogBase m_console; |
52 | private LLUUID m_lastCreatedUser = LLUUID.Random(); | 55 | private LLUUID m_lastCreatedUser = LLUUID.Random(); |
@@ -91,9 +94,11 @@ namespace OpenSim.Grid.UserServer | |||
91 | m_userManager = new UserManager(); | 94 | m_userManager = new UserManager(); |
92 | m_userManager._config = Cfg; | 95 | m_userManager._config = Cfg; |
93 | m_userManager.AddPlugin(Cfg.DatabaseProvider); | 96 | m_userManager.AddPlugin(Cfg.DatabaseProvider); |
97 | |||
98 | m_stats = new UserStatsReporter(); | ||
94 | 99 | ||
95 | m_loginService = new UserLoginService( | 100 | m_loginService = new UserLoginService( |
96 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); | 101 | m_userManager, new LibraryRootFolder(), m_stats, Cfg, Cfg.DefaultStartupMsg); |
97 | 102 | ||
98 | m_messagesService = new MessageServersConnector(MainLog.Instance); | 103 | m_messagesService = new MessageServersConnector(MainLog.Instance); |
99 | 104 | ||
@@ -180,6 +185,7 @@ namespace OpenSim.Grid.UserServer | |||
180 | { | 185 | { |
181 | case "help": | 186 | case "help": |
182 | m_console.Notice("create user - create a new user"); | 187 | m_console.Notice("create user - create a new user"); |
188 | m_console.Notice("stats - statistical information for this server"); | ||
183 | m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); | 189 | m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); |
184 | break; | 190 | break; |
185 | 191 | ||
@@ -192,6 +198,10 @@ namespace OpenSim.Grid.UserServer | |||
192 | m_console.Close(); | 198 | m_console.Close(); |
193 | Environment.Exit(0); | 199 | Environment.Exit(0); |
194 | break; | 200 | break; |
201 | |||
202 | case "stats": | ||
203 | MainLog.Instance.Notice("STATS", Environment.NewLine + m_stats.Report()); | ||
204 | break; | ||
195 | 205 | ||
196 | case "test-inventory": | 206 | case "test-inventory": |
197 | // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>(); | 207 | // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>(); |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 98d19f7..0f02ad2 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -38,6 +38,7 @@ using OpenSim.Framework.Communications.Cache; | |||
38 | using OpenSim.Framework.Console; | 38 | using OpenSim.Framework.Console; |
39 | using OpenSim.Framework.Data; | 39 | using OpenSim.Framework.Data; |
40 | using OpenSim.Framework.Servers; | 40 | using OpenSim.Framework.Servers; |
41 | using OpenSim.Framework.Statistics; | ||
41 | using OpenSim.Framework.UserManagement; | 42 | using OpenSim.Framework.UserManagement; |
42 | using InventoryFolder=OpenSim.Framework.InventoryFolder; | 43 | using InventoryFolder=OpenSim.Framework.InventoryFolder; |
43 | 44 | ||
@@ -53,8 +54,9 @@ namespace OpenSim.Grid.UserServer | |||
53 | public UserConfig m_config; | 54 | public UserConfig m_config; |
54 | 55 | ||
55 | public UserLoginService( | 56 | public UserLoginService( |
56 | UserManagerBase userManager, LibraryRootFolder libraryRootFolder, UserConfig config, string welcomeMess) | 57 | UserManagerBase userManager, LibraryRootFolder libraryRootFolder, |
57 | : base(userManager, libraryRootFolder, welcomeMess) | 58 | UserStatsReporter statsCollector, UserConfig config, string welcomeMess) |
59 | : base(userManager, libraryRootFolder, statsCollector, welcomeMess) | ||
58 | { | 60 | { |
59 | m_config = config; | 61 | m_config = config; |
60 | } | 62 | } |
@@ -290,4 +292,4 @@ namespace OpenSim.Grid.UserServer | |||
290 | } | 292 | } |
291 | } | 293 | } |
292 | } | 294 | } |
293 | } \ No newline at end of file | 295 | } |