Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Reboot Logger SIM_CRASH_REBOOT_LOGGER  

SIM_CRASH_REBOOT_LOGGER

SIM CRASH_REBOOT LOGGER by Kyrah Abattoir.lsl

Category: Reboot Logger
By : Kyrah Abbatoir
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for SIM_CRASH_REBOOT_LOGGER
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. SIM_CRASH_REBOOT_LOGGER_by_Kyrah_Ab_1.lsl
1
2 //********************************************************
3 //This Script was pulled out for you by YadNi Monde from the SL FORUMS at http://forums.secondlife.com/forumdisplay.php?f=15, it is intended to stay FREE by it s author(s) and all the comments here in ORANGE must NOT be deleted. They include notes on how to use it and no help will be provided either by YadNi Monde or it s Author(s). IF YOU DO NOT AGREE WITH THIS JUST DONT USE!!!
4 //********************************************************
5
6
7
8
9
10 /////////////////////////////////////////
11 //SIM CRASH/REBOOT LOGGER
12 //by: Kyrah Abattoir
13 /////////////////////////////////////////
14
15 integer timering = 30;//the polling rate, put the speed you wish, in seconds
16
17 //there we go...
18 integer UNIX;
19 string _buffer;
20 list log;
21 integer span = 0;
22 float fps;
23 float dilation;
24 integer crash = 0;
25 string date;
26 //2004-08-27T00:56:21.785886Z
27
28 default
29 {
31 {
32 llSetTimerEvent(timering);//starting our timer
33 }
34 timer()
35 {
36 string timestamp = llGetTimestamp();
37 list temp = llParseString2List(timestamp,["T",":",":","."],[]);
38 integer _hour = llList2Integer(temp,1) + 4;
39 if(_hour > 24) //getting the hours
40 _hour = _hour - 24 ;
41
42 string _date = llList2String(temp,0);
43 integer _min = llList2Integer(temp,2);
44 integer _sec = llList2Integer(temp,3);
45 string buffer;
46
47 if(date == _date) //daily reset of the average fps and dilation
48 span++;
49 else
50 {
51 span = 1;
52 date = _date;
53 fps = 0;
54 dilation = 0;
55 }
56
57 fps += llGetRegionFPS();
58 dilation += llGetRegionTimeDilation();
59 integer avg_FPS = (integer)(fps/span);
60 string avg_dilation= llGetSubString((string)(dilation/span),0,3);
61
62 buffer += llGetRegionName();
63 buffer += "\n FPS:"+(string)avg_FPS;
64 buffer += " dil. :"+(string)avg_dilation;
65 //buffer += "\n" + llDumpList2String(log,"\n");
66
67 integer _UNIX = _sec + _min * 60 + _hour * 3600;//making our timestamp
68
69 if(_UNIX - UNIX > timering + 5 && UNIX != 0)//okay the delay has been waaay too olong, it probably crashed or rebooted
70 {
71 crash++;
72 log += (string)_date + " - " + (string)_hour+ ":"+(string)_min+":"+(string)_sec;
73 if(llGetListLength(log) > 9)
74 log = llDeleteSubList(log,0,0);
75 }
76 buffer += "\n sim crashes: " + (string)crash + "\n last crash: \n" + llDumpList2String(log,"\n");
77 if(_buffer != buffer); //display
78 {
79 llSetText(buffer,<1,1,1>,1.0);
80 _buffer = buffer;
81 }
82 UNIX = _UNIX;
83 }
84 }// END //

Back to the Best Free Tools in Second Life and OpenSim.