Philip P. Ide

Author, programmer, science enthusiast, half-wit.
Life is sweet. Have you tasted it lately?

User Tools

Site Tools


blog:opensim:scripts:os-gridstats

OS GridStats

I wanted to produce grid statistics for my grid, not because I expect high numbers of visitors (quite the opposite in fact), but because the virtual land in my grid does exist, the visitor counts are quite real, and I wanted to include these stats in the overall opensimulator grid and hypergrid statistics data.

OS_Simple_Stats

This was software written around 9 years ago (at the time I write this in 2025), and although it is promoted by hypergridbusiness.com as a means to generate stats, there are some serious issues with it. It completely distorts the stats it generates. It should count local and hypergrid visitors in the last 30 days, but instead it counts all the visitors before the last 30 days.

In addition, it mis-calculates the available land area and exaggerates it by a factor of 1,000. I've registered these issues on the repository, but the scripts haven't been updated in nine years so I don't hold out much hope. I also shuddered when I saw the SQL being used to make these counts because they were highly inefficient.

I decided to write my own stats generator. Being me, I not only had to make it more accurate, I had to make it better - generating more stats and delivering the output in seven different formats (json, xml, text, html, html-table, wiki-table). The seventh format is a variation of 'text' using CRLF line endings for Windows and DOS users.

os-gridstats

GridStats for opensimulator has been uploaded to github, and the repository is available at https://github.com/stroggprog/os-gridstats.

An example of the output in JSON format:

{
    "error": 0,
    "version": "1.0.2",
    "date-time": "2025-07-10 09:15:02",
    "regions": 11,
    "single_regions": 9,
    "var_regions": 2,
    "total_size_sq_meters": 23658496,
    "total_size_sq_km": 23.658496,
    "hg_visitors_last_30_days": 22,
    "hg_visitors_online_now": 0,
    "registered_users": 9,
    "local_users_last_30_days": 4,
    "local_users_online_now": 0,
    "total_active_last_30_days": 26,
    "total_active_online_now": 0,
    "login_url": "http:\/\/moss.mossgrid.uk:8002",
    "website": "https:\/mossgrid.uk",
    "login_screen": "https:\/\/mossgrid.uk\/welcome",
    "grid_status": true
}

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies

Discussion

Enter your comment:
H Q G F O
 
blog/opensim/scripts/os-gridstats.txt · Last modified: by Phil Ide

Except where otherwise noted, content on this wiki is licensed under the following license: Copyright © Phil Ide
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki