Script ( gibt den aktuellen Speicher im Ram deiner OS-Instance aus, aktuallisieren per, Klick, oder beim performance-blues-bier )
Der Rotz in der Ini ...
PHP-Code:
// Simple formatted Output
// shows either MB or GB as applicable
//
// ==== GET Memory INteger and Format for Display ====
GenStats()
{
// Get Memory and format it
string TotalMem;
string TotMemUsed;
string TxtTail =" used by OpenSimulator Instance";
TotMemUsed = (string)osGetSimulatorMemory();
integer Len = llStringLength(TotMemUsed);
if(Len == 8) // ##.### MB
{
string Mem1 = llGetSubString(TotMemUsed,0,1);
string Mem2 = llGetSubString(TotMemUsed,2,4);
TotalMem = Mem1 + "." + Mem2 + "\nMb"+TxtTail;
}
else if(Len == 9) //###.### MB
{
string Mem1 = llGetSubString(TotMemUsed,0,2);
string Mem2 = llGetSubString(TotMemUsed,3,5);
TotalMem = Mem1 + "." + Mem2 + "\nMb"+TxtTail;
}
else if(Len == 10) //#.### GB
{
string Mem1 = llGetSubString(TotMemUsed,0,0);
string Mem2 = llGetSubString(TotMemUsed,1,3);
TotalMem = Mem1 + "." + Mem2 + "\nGb"+TxtTail;
}
else if(Len == 11) //##.### GB
{
string Mem1 = llGetSubString(TotMemUsed,0,1);
string Mem2 = llGetSubString(TotMemUsed,2,4);
TotalMem = Mem1 + "." + Mem2 + "\nGb"+TxtTail;
}
llSetText(TotalMem, <0.0,2.0,0.0>, 1.0 );
}
default
{
state_entry() // display @ start
{
GenStats();
}
touch(integer num) // refresh on touch
{
GenStats();
}
}
PHP-Code:
AllowOSFunctions = true
Allow_osGetSimulatorMemory = true
www.kamen-fotografie.de | Fotos vom besten Fotografen