removed useless _ folders

This commit is contained in:
Fred Beckhusen
2015-08-09 16:54:31 -05:00
parent fde850293c
commit 948a44dfba
5204 changed files with 2425579 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
<Solution name="SimPerformanceCollector_Web_and_RRD">
<Project name="SimPerformanceCollector_Web_and_RRD" path="SimPerformanceCollector_Web_and_RRD\SimPerformanceCollector_Web_and_RRD.prj" active="true"/>
</Solution>

View File

@@ -0,0 +1,97 @@
// :CATEGORY:Presentations
// :NAME:SimPerformanceCollector_Web_and_RRD
// :AUTHOR:denise
// :CREATED:2011-03-08 01:38:19.877
// :EDITED:2013-09-18 15:39:02
// :ID:756
// :NUM:1040
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// This is the lsl-script. Rezz a box, texture it like a server and place it elsewhere on the sim. No need to be a simowner, no need to deed this prim.
// This script collects the internal grabable informations: FPS, DIL, servername and simname and sends it via HTTP to a PHP-Script on your website. The PHP-script is below. Attention! Watch, that the path to your php-script is correct!
// :CODE:
integer Count; // counter for averaging FPS
integer FPS_Total; // total fps for averaging
key SimStatusQuery;
string simstatus; //Needed to show Simstatus on Website
string RegName = "";
string url_inform;
string website = "http://www.yourdomainhere.de/php/write_rrd.php";
string avg;
string fps_condition;
string dil_cond;
string s_count;
string server;
float TimeDil;
send_data(float dil, integer fps)
{
//fps = fps - 10; //just for testing!
//dil = dilationtime;
url_inform = llHTTPRequest(website,[HTTP_METHOD,"POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"],"dil="+(string)dil+"&fps="+(string)fps+"&region="+RegName+"&server="+server+"&method=set");
}
default
{
state_entry()
{
RegName = llGetRegionName();
server=llGetSimulatorHostname();
Count = 0;
FPS_Total = 0;
llSetText("Collecting Performance-Data for \n" + llGetSimulatorHostname() + "\n" + RegName + "...",<1,0,0>,1);
llSetTimerEvent(60.0);
}
on_rez(integer peram)
{
llResetScript();
}
timer()
{

View File

@@ -0,0 +1,18 @@
// :CATEGORY:Presentations
// :NAME:SimPerformanceCollector_Web_and_RRD
// :AUTHOR:denise
// :CREATED:2011-03-08 01:38:19.877
// :EDITED:2013-09-18 15:39:02
// :ID:756
// :NUM:1041
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
On your server lets create the rrd's (Round Robin Databases) --> http://www.mrtg.org/rrdtool/
// Here are the commands to create a rrd. Let me first say, that I have very less knowledge on rrd's what I have created is an overview for a day. if somebody is able to make it much much better, PLEASE let me know!
// IMPORTANT: The synonym "nameofyoursim" has to be replaced exactly with the simname! The php-script get's the simname and adds only a "_dilfps.rrd" so watch
// :CODE:
/usr/bin/rrdtool create nameofyoursim_dilfps.rrd --step 600 DS:dil:GAUGE:600:0:1 DS:fps:GAUGE:600:0:50 \
RRA:AVERAGE:0.5:1:5040 RRA:AVERAGE:0.5:12:9600

View File

@@ -0,0 +1,66 @@
// :CATEGORY:Presentations
// :NAME:SimPerformanceCollector_Web_and_RRD
// :AUTHOR:denise
// :CREATED:2011-03-08 01:38:19.877
// :EDITED:2013-09-18 15:39:02
// :ID:756
// :NUM:1042
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// This is the PHP-script which is called by the lsl-script. It takes the data, pings the server and put all data into the rrd's
// :CODE:
<?php
$method = $_POST['method'];
$dil = $_POST['dil'];
$fps = $_POST['fps'];
$region = $_POST['region'];
$server = $_POST['server'];
$path = "/home/n/ndlsim.de/php/cms/php/";
if ($method=="")
{
die("result = No Method provided!");
}
if ($region=="")
{
die("result = No region provided!");
//alerts script in SL not to send any data any more and to inform the owner about this damn error... :)
} else {
$region = str_replace(" ","_",$region);
$RRDFILE = $path.$region."_dilfps.rrd";
$RRDFILE_ping = $path.$region."_ping.rrd";
}
echo ("result = $server");
$resultping = shell_exec("/bin/ping $server -c 1");

View File

@@ -0,0 +1,56 @@
// :CATEGORY:Presentations
// :NAME:SimPerformanceCollector_Web_and_RRD
// :AUTHOR:denise
// :CREATED:2011-03-08 01:38:19.877
// :EDITED:2013-09-18 15:39:02
// :ID:756
// :NUM:1043
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// And last but not least, we have to build the graph from the data. it's a bash-script (Linux) which create the graphs.
// :CODE:
#!/bin/bash
#
RRDFILE=/home/n/ndlsim.de/php/cms/php/yoursimnamehere_dilfps.rrd
RRDPING=/home/n/ndlsim.de/php/cms/php/yoursimnamehere_ping.rrd
GRAPHFILE1=/home/n/ndlsim.de/php/cms/bilder/yoursimname_DIL.png
GRAPHFILE2=/home/n/ndlsim.de/php/cms/bilder/yoursimname_FPS.png
GRAPHFILE3=/home/n/ndlsim.de/php/cms/bilder/yoursimname_ping.png
rrdtool graph $GRAPHFILE1 -v "Dilation" \
-u 1.1 -l 0 \
-t "Dilation Time for yoursim" \
DEF:dil=$RRDFILE:dil:AVERAGE LINE2:dil#309030:"Dilation Time" \
HRULE:1.0#AAAA00:"Performace best / Performance sehr gut" \
HRULE:0.8#0000FF:"Performace ok / Performance gut" \
HRULE:0.5#FF0000:"Lagging expected / Lag zu erwarten" \
COMMENT:"\\n" \
COMMENT:"(Last updated\: $(/bin/date "+%d.%m.%Y %H\:%M\:%S"))\r" \
-w 600 -h 200 -a PNG
rrdtool graph $GRAPHFILE2 -v "FPS" \
-u 50.0 -l 0 \

View File

@@ -0,0 +1,12 @@
<Project name="SimPerformanceCollector_Web_and_RRD" guid="D8A8E7C3-6C00-1014-B904-200204C60A89">
<Object name="Object" guid="D8A8E8C2-6C00-1014-B904-200204C60A89">
<Script name="SimPerformanceCollector_Web_and_RRD_1.lsl" guid="D8A91491-6C00-1014-B904-200204C60A89">
</Script>
<Script name="SimPerformanceCollector_Web_and_RRD_2.lsl" guid="D8A92B70-6C00-1014-B904-200204C60A89">
</Script>
<Script name="SimPerformanceCollector_Web_and_RRD_3.lsl" guid="D8A93F53-6C00-1014-B904-200204C60A89">
</Script>
<Script name="SimPerformanceCollector_Web_and_RRD_4.lsl" guid="D8A9600E-6C00-1014-B904-200204C60A89">
</Script>
</Object>
</Project>