From 963cf25813ad2bd6dceaa39757391fbf94d6f09e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 13 Dec 2009 03:04:16 +1100 Subject: * Implements OSSL function: osGetSimulatorMemory - returns the current amount of memory allocated to the simulator process (Moderate Threat Level). * Cleans redundant information out of the Simulator Version. Versions now look like: "OpenSimulator 0.6.9(dev) Unix/Mono" * [Minor] additional log info for MySQLInventoryData --- CONTRIBUTORS.txt | 346 ++++++++++----------- OpenSim/Data/MySQL/MySQLInventoryData.cs | 3 + OpenSim/Framework/Util.cs | 20 ++ OpenSim/Region/Framework/Scenes/Scene.cs | 5 + .../Shared/Api/Implementation/OSSL_Api.cs | 13 + .../ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 2 + .../ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 10 + 7 files changed, 226 insertions(+), 173 deletions(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 0d78928..08048f5 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -1,173 +1,173 @@ -The following people have contributed to OpenSim (Thank you -for your effort!) - -Add your name in here if you have committed to OpenSim - -= Current OpenSim Developers (in very rough order of appearance) = -These folks represent the current core team for OpenSim, and are the -people that make the day to day of OpenSim happen. - -* MW (Tribal Media AB) -* Adam Frisby (DeepThink Pty Ltd) -* MingChen (DeepThink Pty Ltd) -* lbsa71 (Tribal Media AB) -* Sean Dague / sdague (IBM) -* Tedd -* justincc -* Teravus (w3z) -* Johan Berntsson (3Di) -* Ckrinke (Charles Krinke) -* chi11ken (Genkii) -* adjohn (Genkii) -* Dr Scofield aka Dirk Husemann (IBM Research - Zurich) -* dahlia -* mikem (3Di) -* Melanie Thielker -* Homer_Horwitz -* idb (Ian Brown) -* Diva (Crista Lopes, University of California, Irvine) -* nlin (3Di) -* Arthur Rodrigo S Valadares (IBM) - - -= Past Open Sim Developers = -These folks are alumns of the OpenSim core group, but are now -currently not active. Their great contributions helped get us to -where we are today. - -* Gareth -* Andy- -* MorphW -* CW -* Babblefrog -* Danx0r -* Dalien -* Darok -* Alondria - - -= Additional OpenSim Contributors = -These folks have contributed code patches to OpenSim to help make it -what it is today. - -* aduffy70 -* A_Biondi -* alex_carnell -* Alan Webb (IBM) -* BigFootAg -* BlueWall Slade -* brianw/Sir_Ahzz -* CharlieO -* ChrisDown -* Chris Yeoh (IBM) -* coyled -* Daedius -* Dong Jun Lan (IBM) -* DoranZemlja -* daTwitch -* devalnor-#708 -* dmiles (Daxtron Labs) -* dslake (Intel) -* FredoChaplin -* Gerhard -* Godfrey -* Grumly57 -* Ewe Loon -* Fly-Man -* Flyte Xevious -* Imaze Rhiano -* Intimidated -* Jeremy Bongio (IBM) -* jhurliman -* John R Sohn (XenReborn) -* jonc -* Junta Kohime -* Kayne -* Kevin Cozens -* kinoc (Daxtron Labs) -* Kitto Flora -* KittyLiu -* Kurt Taylor (IBM) -* lulurun -* M.Igarashi -* maimedleech -* Mic Bowman -* Michelle Argus -* Michael Cortez (The Flotsam Project, http://osflotsam.org/) -* Mike Osias (IBM) -* Mike Pitman (IBM) -* mikkopa/_someone - RealXtend -* Misterblue (Intel) -* Mircea Kitsune -* mpallari -* nornalbion -* Omar Vera Ustariz (IBM) -* openlifegrid.com -* otakup0pe -* ralphos -* RemedyTomm -* Revolution -* Richard Alimi (IBM) -* Rick Alther (IBM) -* Rob Smart (IBM) -* rtomita -* Ruud Lathorp -* SachaMagne -* Salahzar Stenvaag -* sempuki -* Snoopy -* Strawberry Fride -* tglion -* tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud) -* tyre -* Vytek -* webmage (IBM) -* Xantor -* Y. Nitta -* YZh -* Zackary Geers aka Kunnis Basiat -* Zha Ewry - - -= LSL Devs = - -* Alondria -* CharlieO -* Tedd -* Melanie Thielker - - -= Testers = - -* Ai Austin -* CharlieO (LSL) -* Ckrinke -* openlifegrid.com - - -This software uses components from the following developers: -* Sleepycat Software (Berkeley DB) -* SQLite (Public Domain) -* XmlRpcCS (http://xmlrpccs.sf.net/) -* MySQL, Inc. (MySQL Connector/NET) -* NUnit (http://www.nunit.org) -* AGEIA Inc. (PhysX) -* Russel L. Smith (ODE) -* Prebuild (http://sourceforge.net/projects/dnpb/) -* LibOpenMetaverse (http://lib.openmetaverse.org/) -* DotNetOpenMail v0.5.8b (http://dotnetopenmail.sourceforge.net) -* Prototype JavaScript Framework ajax (http://www.prototypejs.org/) -* C5 GENERIC COLLECTION LIBRARY FOR C#/CLI -* Nini (http://nini.sourceforge.net/) -* log4net (http://logging.apache.org/log4net/) -* GlynnTucker.Cache (http://gtcache.sourceforge.net/) -* NDesk.Options 0.2.1 (http://www.ndesk.org/Options) - -Some plugins are based on Cable Beach -Cable Beach is Copyright (c) 2008 Intel Corporation -see http://forge.opensimulator.org/gf/project/assetserver/ - -In addition, we would like to thank: -* The Mono Project -* The NANT Developers -* Microsoft (.NET, MSSQL-Adapters) +The following people have contributed to OpenSim (Thank you +for your effort!) + +Add your name in here if you have committed to OpenSim + += Current OpenSim Developers (in very rough order of appearance) = +These folks represent the current core team for OpenSim, and are the +people that make the day to day of OpenSim happen. + +* MW (Tribal Media AB) +* Adam Frisby (DeepThink Pty Ltd) +* MingChen (DeepThink Pty Ltd) +* lbsa71 (Tribal Media AB) +* Sean Dague / sdague (IBM) +* Tedd +* justincc +* Teravus (w3z) +* Johan Berntsson (3Di) +* Ckrinke (Charles Krinke) +* chi11ken (Genkii) +* adjohn (Genkii) +* Dr Scofield aka Dirk Husemann (IBM Research - Zurich) +* dahlia +* mikem (3Di) +* Melanie Thielker +* Homer_Horwitz +* idb (Ian Brown) +* Diva (Crista Lopes, University of California, Irvine) +* nlin (3Di) +* Arthur Rodrigo S Valadares (IBM) + + += Past Open Sim Developers = +These folks are alumns of the OpenSim core group, but are now +currently not active. Their great contributions helped get us to +where we are today. + +* Gareth +* Andy- +* MorphW +* CW +* Babblefrog +* Danx0r +* Dalien +* Darok +* Alondria + + += Additional OpenSim Contributors = +These folks have contributed code patches to OpenSim to help make it +what it is today. + +* aduffy70 +* A_Biondi +* alex_carnell +* Alan Webb (IBM) +* BigFootAg +* BlueWall Slade +* brianw/Sir_Ahzz +* CharlieO +* ChrisDown +* Chris Yeoh (IBM) +* coyled +* Daedius +* Dong Jun Lan (IBM) +* DoranZemlja +* daTwitch +* devalnor-#708 +* dmiles (Daxtron Labs) +* dslake (Intel) +* FredoChaplin +* Gerhard +* Godfrey +* Grumly57 +* Ewe Loon +* Fly-Man +* Flyte Xevious +* Imaze Rhiano +* Intimidated +* Jeremy Bongio (IBM) +* jhurliman +* John R Sohn (XenReborn) +* jonc +* Junta Kohime +* Kayne +* Kevin Cozens +* kinoc (Daxtron Labs) +* Kitto Flora +* KittyLiu +* Kurt Taylor (IBM) +* lulurun +* M.Igarashi +* maimedleech +* Mic Bowman +* Michelle Argus +* Michael Cortez (The Flotsam Project, http://osflotsam.org/) +* Mike Osias (IBM) +* Mike Pitman (IBM) +* mikkopa/_someone - RealXtend +* Misterblue (Intel) +* Mircea Kitsune +* mpallari +* nornalbion +* Omar Vera Ustariz (IBM) +* openlifegrid.com +* otakup0pe +* ralphos +* RemedyTomm +* Revolution +* Richard Alimi (IBM) +* Rick Alther (IBM) +* Rob Smart (IBM) +* rtomita +* Ruud Lathorp +* SachaMagne +* Salahzar Stenvaag +* sempuki +* Snoopy +* Strawberry Fride +* tglion +* tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud) +* tyre +* Vytek +* webmage (IBM) +* Xantor +* Y. Nitta +* YZh +* Zackary Geers aka Kunnis Basiat +* Zha Ewry + + += LSL Devs = + +* Alondria +* CharlieO +* Tedd +* Melanie Thielker + + += Testers = + +* Ai Austin +* CharlieO (LSL) +* Ckrinke +* openlifegrid.com + + +This software uses components from the following developers: +* Sleepycat Software (Berkeley DB) +* SQLite (Public Domain) +* XmlRpcCS (http://xmlrpccs.sf.net/) +* MySQL, Inc. (MySQL Connector/NET) +* NUnit (http://www.nunit.org) +* AGEIA Inc. (PhysX) +* Russel L. Smith (ODE) +* Prebuild (http://sourceforge.net/projects/dnpb/) +* LibOpenMetaverse (http://lib.openmetaverse.org/) +* DotNetOpenMail v0.5.8b (http://dotnetopenmail.sourceforge.net) +* Prototype JavaScript Framework ajax (http://www.prototypejs.org/) +* C5 GENERIC COLLECTION LIBRARY FOR C#/CLI +* Nini (http://nini.sourceforge.net/) +* log4net (http://logging.apache.org/log4net/) +* GlynnTucker.Cache (http://gtcache.sourceforge.net/) +* NDesk.Options 0.2.1 (http://www.ndesk.org/Options) + +Some plugins are based on Cable Beach +Cable Beach is Copyright (c) 2008 Intel Corporation +see http://forge.opensimulator.org/gf/project/assetserver/ + +In addition, we would like to thank: +* The Mono Project +* The NANT Developers +* Microsoft (.NET, MSSQL-Adapters) diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 0ea0cb7..d560c5f 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -91,6 +91,9 @@ namespace OpenSim.Data.MySQL rollbackStore = GridDataMySqlFile.ParseFileReadValue("rollback") == "true"; opengridmode = GridDataMySqlFile.ParseFileReadValue("opengridmode") == "true"; + if(rollbackStore) + m_log.Warn("[MysqlInventory] Enabling rollback mode in: " + rollbackDir); + database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 1112497..7215086 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -1007,6 +1007,26 @@ namespace OpenSim.Framework return os; } + public static string GetRuntimeInformation() + { + string ru = String.Empty; + + if (Environment.OSVersion.Platform == PlatformID.Unix) + ru = "Unix/Mono"; + else + if (Environment.OSVersion.Platform == PlatformID.MacOSX) + ru = "OSX/Mono"; + else + { + if (Type.GetType("Mono.Runtime") != null) + ru = "Win/Mono"; + else + ru = "Win/.NET"; + } + + return ru; + } + /// /// Is the given string a UUID? /// diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a22fb5f..cc13972 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -574,10 +574,15 @@ namespace OpenSim.Region.Framework.Scenes StatsReporter.SetObjectCapacity(objectCapacity); + // Old + /* m_simulatorVersion = simulatorVersion + " (OS " + Util.GetOperatingSystemInformation() + ")" + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() + " PhysPrim:" + m_physicalPrim.ToString(); + */ + + m_simulatorVersion = simulatorVersion + " (" + Util.GetRuntimeInformation() + ")"; try { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 5501679..e9e54ae 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1970,5 +1970,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return ret; } + public int osGetSimulatorMemory() + { + CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); + m_host.AddScriptLPS(1); + long pws = System.Diagnostics.Process.GetCurrentProcess().WorkingSet64; + + if (pws > Int32.MaxValue) + return Int32.MaxValue; + if (pws < 0) + return 0; + + return (int)pws; + } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 0b0dc00..580c354 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -163,5 +163,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces key osGetMapTexture(); key osGetRegionMapTexture(string regionName); LSL_List osGetRegionStats(); + + int osGetSimulatorMemory(); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 519463e..2876ad6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -637,5 +637,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { return m_OSSL_Functions.osGetRegionStats(); } + + /// + /// Returns the amount of memory in use by the Simulator Daemon. + /// Amount in bytes - if >= 4GB, returns 4GB. (LSL is not 64-bit aware) + /// + /// + public LSL_Integer osGetSimulatorMemory() + { + return m_OSSL_Functions.osGetSimulatorMemory(); + } } } -- cgit v1.1