MantisBT - opensim
View Issue Details
0008564opensim[REGION] Script Functionspublic2019-07-18 23:152019-07-31 18:38
master (dev code) 
Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
Mono / Linux64
0008564: Simulator uptime through ossl
Either expanding the osGetRegionStats() function with a STATS_SIM_UPTIME part or adding a osGetSimUptime() to fetch the simulator uptime as there is a console function for this already implemented and knowing(showing off) the uptime might be desireable for statistical analysis and testing stability over time.
I noticed that a simulator that has been running idle for months now suddenly jumped in memory usage from 2-4gb to 8gb as of this posting. It has been running 165 days now. A hint to a potential memory leak, though I would say running a sim that long is not normal either. Does show how stable we have gotten though :)
No tags attached.
Issue History
2019-07-18 23:15tampaNew Issue
2019-07-31 06:38UbitUmarovNote Added: 0035520
2019-07-31 18:38tampaNote Added: 0035530
2019-07-31 18:38tampaStatusnew => resolved
2019-07-31 18:38tampaFixed in Version => master (dev code)
2019-07-31 18:38tampaResolutionopen => fixed
2019-07-31 18:38tampaAssigned To => tampa

2019-07-31 06:38   
added "region_up_time" to llGetEnv

returns a string with seconds since region start
that string represents a integer

to get a number just do:
integer uptime = (string)llGetEnv("region_up_time");

this could had been done using current api, but ok
2019-07-31 18:38   
I know there are other ways, but this is simpler and likely more reliable. Thanks for adding it, much appreciated!