31 using System.Reflection;
36 using OpenMetaverse.StructuredData;
37 using OpenSim.Framework;
38 using OpenSim.Framework.Console;
39 using OpenSim.Framework.Servers;
40 using OpenSim.Framework.Servers.HttpServer;
41 using OpenSim.Framework.Monitoring;
42 using OpenSim.Region.Framework;
43 using OpenSim.Region.Framework.Interfaces;
44 using OpenSim.Region.Framework.Scenes;
46 namespace OpenSim.
Region.Framework.Scenes
52 private string osXStatsURI = String.Empty;
55 public string localZone = TimeZone.CurrentTimeZone.StandardName;
56 public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);
59 : base(
"GET",
"/" + Util.SHA1Hash(region_info.regionSecret),
"RegionStats",
"Region Statistics")
61 regionInfo = region_info;
62 osXStatsURI = Util.SHA1Hash(regionInfo.osSecret);
68 return Util.UTF8.GetBytes(Report());
71 public override string ContentType
73 get {
return "text/plain"; }
76 private string Report()
80 args[
"OSStatsURI"] = OSD.FromString(
"http://" + regionInfo.ExternalHostName +
":" + regionInfo.HttpPort +
"/" + osXStatsURI +
"/");
81 args[
"TimeZoneName"] = OSD.FromString(localZone);
82 args[
"TimeZoneOffs"] = OSD.FromReal(utcOffset.TotalHours);
83 args[
"UxTime"] = OSD.FromInteger(Util.ToUnixTime(DateTime.Now));
84 args[
"Memory"] = OSD.FromReal(Math.Round(GC.GetTotalMemory(
false) / 1024.0 / 1024.0));
87 string strBuffer =
"";
88 strBuffer = OSDParser.SerializeJsonString(args);
Base streamed request handler.
RegionStatsHandler(RegionInfo region_info)
OpenMetaverse.StructuredData.OSDMap OSDMap
override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)