Shortnote

The following script will display the amount of memory used by the OpenSim daemon. It uses LSL-C#, and needs the AllowedCompiler' setting to allow C# scripting.

Code

//c#
///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3      //
//  Please see: http://www.gnu.org/licenses/gpl.html for legal details,  //
//  rights of fair usage, the disclaimer and warranty conditions.        //
///////////////////////////////////////////////////////////////////////////
 
public void default_event_state_entry() {
    llSetTimerEvent(1);
}
 
public void default_event_timer() {
    System.Diagnostics.Process proc = System.Diagnostics.Process.GetCurrentProcess();
    LSL_Types.LSLString id = (LSL_Types.LSLString)((LSL_Types.LSLInteger)(proc.PrivateMemorySize64/1024));
    llSetText("OpenSim Used Memory: " + id + "KB", new LSL_Types.Vector3(1,1,0), 1);
}