« OpenSim Statistiques » : différence entre les versions
Apparence
Aucun résumé des modifications |
|||
| Ligne 14 : | Ligne 14 : | ||
* À l'aide d'une page web PHP qui affiche les statistiques en interrogeant jsonsimstats. Ci-dessous le code de la page : | * À l'aide d'une page web PHP qui affiche les statistiques en interrogeant jsonsimstats. Ci-dessous le code de la page : | ||
{{Code PHP Stats}} | {{Code PHP Stats}} | ||
= Affichage des résultats = | |||
Les trois résultats ci-dessous sont ceux d'une '''standalone locale presque vide, avec 2 avatars connectés'''. | |||
== Dans la console de la région == | |||
<pre> | |||
16:03:42 - DIAGNOSTICS | |||
Time now is 2026-01-22 16:03:42 | |||
Server has been running since Thursday, 2026-01-22 15:41:42 | |||
That is an elapsed time of 00:22:00.4083404 | |||
Heap allocated: 45MB allocation rate (last/avg): 0.122/0.073MB/s | |||
GCTotalCommited: 58MB GCTotalAvaiable 15864MB GCHMthreshold 7932MB | |||
Process memory: Physical 208MB Paged 0MB | |||
Peak process memory: Physical 208MB Paged 0MB | |||
Total process Threads 31 | |||
9 threads are being tracked: | |||
ID NAME LAST UPDATE (MS) LIFETIME (MS) PRIORITY STATE | |||
13 PollServiceWatcherThread 89 1320014 Normal Background, WaitSleepJoin | |||
15 MapBlocks (Region) 1001 1319139 Normal Background, WaitSleepJoin | |||
16 Yengine sleep (Region) 1515 1319088 Normal Background, WaitSleepJoin | |||
17 YScript0 (Region) 1426 1319087 Normal Background, WaitSleepJoin | |||
18 YScript1 (Region) 2428 1319087 Normal Background, WaitSleepJoin | |||
19 Incoming Packets (Region) 79 1318960 Normal Background, WaitSleepJoin | |||
20 Outgoing Packets (Region) 14 1318960 Normal Background, WaitSleepJoin | |||
21 AsyncLSLCmdHandlerThread 24 1318630 Normal Background, WaitSleepJoin | |||
22 Heartbeat-(Region) 73 1318565 Normal WaitSleepJoin | |||
Framework main threadpool | |||
workers: 1 (1000 / 16) | |||
Completion: 0 (1000 / 1) | |||
Threadpool (excluding script engine pools) | |||
Thread pool used : SmartThreadPool | |||
Max threads : 300 | |||
Min threads : 2 | |||
Allocated threads : 5 | |||
In use threads : 3 | |||
Work items waiting : 0 | |||
Total process threads: 31 | |||
</pre> | |||
== Page http://<domaine>:<port de la région>/SStats== | |||
=== Home === | |||
{|class="wikitable" | |||
|- | |||
! scope="col"| # Users Total | |||
! scope="col"| # Sessions Total | |||
! scope="col"| Avg Client FPS | |||
! scope="col"| Avg Client Mem Use | |||
! scope="col"| Avg Sim FPS | |||
! scope="col"| Avg Ping | |||
! scope="col"| KB Out Total | |||
! scope="col"| l KB In Total | |||
|- | |||
|2 | |||
|2 | |||
|1.1270192 | |||
|973214 | |||
|10.543559 | |||
|24.334679 | |||
|1819.0166 | |||
|125.203125 | |||
|- | |||
|} | |||
===Client === | |||
{|class="wikitable" | |||
|- | |||
!ClientVersion | |||
!Count/% | |||
!SimFPS | |||
|Firestorm-Releasex64 7.2.2.79439 | |||
|2/100% | |||
|10.543559 | |||
|- | |||
|} | |||
===Sessions=== | |||
{|class="wikitable" | |||
|- | |||
!FirstName | |||
!LastName | |||
!SessionEnd | |||
!SessionLength | |||
!Client | |||
|test | |||
|001 | |||
|1/22/2026 - 2:47 PM | |||
| | |||
|Firestorm-Releasex64 7.2.2.79439 | |||
|- | |||
|test | |||
|002 | |||
|1/22/2026 - 3:00 PM | |||
| | |||
|Firestorm-Releasex64 7.2.2.79439 | |||
|- | |||
|} | |||
=Page PHP = | |||
<pre> | |||
stdClass Object | |||
( | |||
[Dilatn] => 1 | |||
[SimFPS] => 55.1 | |||
[PhyFPS] => 55.1 | |||
[AgntUp] => 0 | |||
[RootAg] => 2 | |||
[ChldAg] => 0 | |||
[NPCAg] => 0 | |||
[Prims] => 4 | |||
[AtvPrm] => 0 | |||
[AtvScr] => 4 | |||
[ScrLPS] => 0 | |||
[ScrEPS] => 0 | |||
[PktsIn] => 3 | |||
[PktOut] => 3 | |||
[PendDl] => 0 | |||
[PendUl] => 0 | |||
[UnackB] => 0 | |||
[TotlFt] => 18.15 | |||
[NetFt] => 0 | |||
[PhysFt] => 0.09 | |||
[OthrFt] => 0 | |||
[AgntFt] => 0 | |||
[ImgsFt] => 0 | |||
[FrameDilatn] => 1 | |||
[Logging in Users] => 0 | |||
[GeoPrims] => 1 | |||
[Mesh Objects] => 3 | |||
[Script Engine Thread Count] => 0 | |||
[RegionName] => Region | |||
[Util Thread Count] => 3 | |||
[System Thread Count] => 31 | |||
[System Thread Active] => 1 | |||
[ProcMem] => 212604 | |||
[Memory] => 45 | |||
[Uptime] => 00:21:53.4804530 | |||
[Version] => OpenSim 0.9.3.0 Nessie Dev | |||
</pre> | |||
Version du 22 janvier 2026 à 15:07
Obtenir les statistiques de la région
Configurer OpenSim.ini
Ajouter cette configuration à la fin du fichier :
[WebStats] enabled=true
Source
http://opensimulator.org/wiki/FAQ/fr#Statistiques_de_la_r.C3.A9gion_sur_une_page_Web
Récupérer les résultats
Il existe plusieurs façons de récupérer les statistiques de la région :
- Dans la console de la région.
- Sur une page web à l'adresse
http://<domaine>:<port de la région>/SStats/default.report
- À l'aide d'une page web PHP qui affiche les statistiques en interrogeant jsonsimstats. Ci-dessous le code de la page :
<?php
/**
* Page pour obtenir et afficher les statistiques de simulation.
* Code créé par Acryline Erin.
* Code libre d'utilisation.
* Date : 22 janvier 2026
*/
// Trouver les données
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost:9000/jsonSimStats");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "postvar1=value1&postvar2=value2&postvar3=value3");
// Réponse
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch);
// Vérification des erreurs cURL
if ($json === false) {
echo 'Erreur cURL: ' . curl_error($ch);
} else {
// Décoder la réponse JSON
$response = json_decode($json);
// Vérification de la validité de l'objet JSON
if (json_last_error() === JSON_ERROR_NONE) {
// Afficher la réponse
echo "<pre>";
print_r($response);
echo "</pre>";
} else {
echo "Erreur de décodage JSON : " . json_last_error_msg();
}
}
curl_close($ch);
?>
Affichage des résultats
Les trois résultats ci-dessous sont ceux d'une standalone locale presque vide, avec 2 avatars connectés.
Dans la console de la région
16:03:42 - DIAGNOSTICS
Time now is 2026-01-22 16:03:42
Server has been running since Thursday, 2026-01-22 15:41:42
That is an elapsed time of 00:22:00.4083404
Heap allocated: 45MB allocation rate (last/avg): 0.122/0.073MB/s
GCTotalCommited: 58MB GCTotalAvaiable 15864MB GCHMthreshold 7932MB
Process memory: Physical 208MB Paged 0MB
Peak process memory: Physical 208MB Paged 0MB
Total process Threads 31
9 threads are being tracked:
ID NAME LAST UPDATE (MS) LIFETIME (MS) PRIORITY STATE
13 PollServiceWatcherThread 89 1320014 Normal Background, WaitSleepJoin
15 MapBlocks (Region) 1001 1319139 Normal Background, WaitSleepJoin
16 Yengine sleep (Region) 1515 1319088 Normal Background, WaitSleepJoin
17 YScript0 (Region) 1426 1319087 Normal Background, WaitSleepJoin
18 YScript1 (Region) 2428 1319087 Normal Background, WaitSleepJoin
19 Incoming Packets (Region) 79 1318960 Normal Background, WaitSleepJoin
20 Outgoing Packets (Region) 14 1318960 Normal Background, WaitSleepJoin
21 AsyncLSLCmdHandlerThread 24 1318630 Normal Background, WaitSleepJoin
22 Heartbeat-(Region) 73 1318565 Normal WaitSleepJoin
Framework main threadpool
workers: 1 (1000 / 16)
Completion: 0 (1000 / 1)
Threadpool (excluding script engine pools)
Thread pool used : SmartThreadPool
Max threads : 300
Min threads : 2
Allocated threads : 5
In use threads : 3
Work items waiting : 0
Total process threads: 31
Page http://<domaine>:<port de la région>/SStats
Home
| # Users Total | # Sessions Total | Avg Client FPS | Avg Client Mem Use | Avg Sim FPS | Avg Ping | KB Out Total | l KB In Total |
|---|---|---|---|---|---|---|---|
| 2 | 2 | 1.1270192 | 973214 | 10.543559 | 24.334679 | 1819.0166 | 125.203125 |
Client
| ClientVersion | Count/% | SimFPS | Firestorm-Releasex64 7.2.2.79439 | 2/100% | 10.543559 |
|---|
Sessions
| FirstName | LastName | SessionEnd | SessionLength | Client | test | 001 | 1/22/2026 - 2:47 PM | Firestorm-Releasex64 7.2.2.79439 | |
|---|---|---|---|---|---|---|---|---|---|
| test | 002 | 1/22/2026 - 3:00 PM | Firestorm-Releasex64 7.2.2.79439 |
Page PHP
stdClass Object
(
[Dilatn] => 1
[SimFPS] => 55.1
[PhyFPS] => 55.1
[AgntUp] => 0
[RootAg] => 2
[ChldAg] => 0
[NPCAg] => 0
[Prims] => 4
[AtvPrm] => 0
[AtvScr] => 4
[ScrLPS] => 0
[ScrEPS] => 0
[PktsIn] => 3
[PktOut] => 3
[PendDl] => 0
[PendUl] => 0
[UnackB] => 0
[TotlFt] => 18.15
[NetFt] => 0
[PhysFt] => 0.09
[OthrFt] => 0
[AgntFt] => 0
[ImgsFt] => 0
[FrameDilatn] => 1
[Logging in Users] => 0
[GeoPrims] => 1
[Mesh Objects] => 3
[Script Engine Thread Count] => 0
[RegionName] => Region
[Util Thread Count] => 3
[System Thread Count] => 31
[System Thread Active] => 1
[ProcMem] => 212604
[Memory] => 45
[Uptime] => 00:21:53.4804530
[Version] => OpenSim 0.9.3.0 Nessie Dev