mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Fixes Mantis # 3469. Thank you kindly, BlueWall, for a patch that:
This patch adds extended status reporting with the url http://server:port/simstatusx/ [^] . The data is returned in json format as "text/plain" type.
This commit is contained in:
@@ -31,6 +31,9 @@ using System.Text;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework.Statistics.Interfaces;
|
||||
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
||||
namespace OpenSim.Framework.Statistics
|
||||
{
|
||||
/// <summary>
|
||||
@@ -380,6 +383,53 @@ Asset service request failures: {3}" + Environment.NewLine,
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Report back collected statistical information.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override string XReport()
|
||||
{
|
||||
OSDMap args = new OSDMap(28);
|
||||
args["AssetsInCache"] = OSD.FromReal(AssetsInCache);
|
||||
args["TimeAfterCacheMiss"] = OSD.FromReal(assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0);
|
||||
args["BlockedMissingTextureRequests"] = OSD.FromReal(BlockedMissingTextureRequests);
|
||||
args["AssetServiceRequestFailures"] = OSD.FromReal(AssetServiceRequestFailures);
|
||||
args["abnormalClientThreadTerminations"] = OSD.FromReal(abnormalClientThreadTerminations);
|
||||
args["InventoryServiceRetrievalFailures"] = OSD.FromReal(InventoryServiceRetrievalFailures);
|
||||
args["Dilatn"] = OSD.FromReal(timeDilation);
|
||||
args["SimFPS"] = OSD.FromReal(simFps);
|
||||
args["PhyFPS"] = OSD.FromReal(physicsFps);
|
||||
args["AgntUp"] = OSD.FromReal(agentUpdates);
|
||||
args["RootAg"] = OSD.FromReal(rootAgents);
|
||||
args["ChldAg"] = OSD.FromReal(childAgents);
|
||||
args["Prims"] = OSD.FromReal(totalPrims);
|
||||
args["AtvPrm"] = OSD.FromReal(activePrims);
|
||||
args["AtvScr"] = OSD.FromReal(activeScripts);
|
||||
args["ScrLPS"] = OSD.FromReal(scriptLinesPerSecond);
|
||||
args["PktsIn"] = OSD.FromReal(inPacketsPerSecond);
|
||||
args["PktOut"] = OSD.FromReal(outPacketsPerSecond);
|
||||
args["PendDl"] = OSD.FromReal(pendingDownloads);
|
||||
args["PendUl"] = OSD.FromReal(pendingUploads);
|
||||
args["UnackB"] = OSD.FromReal(unackedBytes);
|
||||
args["TotlFt"] = OSD.FromReal(totalFrameTime);
|
||||
args["NetFt"] = OSD.FromReal(netFrameTime);
|
||||
args["PhysFt"] = OSD.FromReal(physicsFrameTime);
|
||||
args["OthrFt"] = OSD.FromReal(otherFrameTime);
|
||||
args["AgntFt"] = OSD.FromReal(agentFrameTime);
|
||||
args["ImgsFt"] = OSD.FromReal(imageFrameTime);
|
||||
args["Memory"] = OSD.FromString(base.XReport());
|
||||
|
||||
string strBuffer = "";
|
||||
byte[] buffer = new byte[1];
|
||||
|
||||
strBuffer = OSDParser.SerializeJsonString(args);
|
||||
UTF8Encoding str = new UTF8Encoding();
|
||||
buffer = str.GetBytes(strBuffer);
|
||||
|
||||
return strBuffer;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -402,5 +452,10 @@ Asset service request failures: {3}" + Environment.NewLine,
|
||||
{
|
||||
return m_statsProvider.GetStats();
|
||||
}
|
||||
|
||||
public string XReport()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user