<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=User%3AAllen_Kerensky%2FJSON_Grid_SimStats</id>
		<title>User:Allen Kerensky/JSON Grid SimStats - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=User%3AAllen_Kerensky%2FJSON_Grid_SimStats"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/JSON_Grid_SimStats&amp;action=history"/>
		<updated>2026-04-17T04:33:24Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/index.php?title=User:Allen_Kerensky/JSON_Grid_SimStats&amp;diff=31836&amp;oldid=prev</id>
		<title>Allen Kerensky: archived JSON grid simstats from test page</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=User:Allen_Kerensky/JSON_Grid_SimStats&amp;diff=31836&amp;oldid=prev"/>
				<updated>2013-02-09T04:52:55Z</updated>
		
		<summary type="html">&lt;p&gt;archived JSON grid simstats from test page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= JSON Grid Simstats =&lt;br /&gt;
Archived from [[Test Page]]&lt;br /&gt;
&lt;br /&gt;
Python example to gain the region data from a grid service&lt;br /&gt;
 - should work but this version not tested -&lt;br /&gt;
         *reference material* &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 import hashlib&lt;br /&gt;
 import urllib2&lt;br /&gt;
&lt;br /&gt;
 ''' value shown is an example, get this from your grid database each time - regions.regionSecret '''&lt;br /&gt;
 regionsecret = 'fe21314b-6267-44f7-aa1e-6047e1c3f94a'&lt;br /&gt;
&lt;br /&gt;
 ''' My region host '''&lt;br /&gt;
 hostName =  myregion.host.net&lt;br /&gt;
&lt;br /&gt;
 ''' My region port '''&lt;br /&gt;
 hostPort = 9000&lt;br /&gt;
&lt;br /&gt;
 ''' create an *UPPERCASE* SHA1 hash from the regionSecret '''&lt;br /&gt;
 resourceName = str(hashlib.sha1(regionsecret).hexdigest()).upper()&lt;br /&gt;
&lt;br /&gt;
 regionuri = hostName + &amp;quot;:&amp;quot; + hostPort + &amp;quot;/&amp;quot; + resourceName + &amp;quot;/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ''' data includes TimeZoneName , TimeZoneOffs, UxTime, Memory, Version and OSStatsURI '''&lt;br /&gt;
 regiondata = simplejson.load(urllib2.urlopen(regionuri))&lt;br /&gt;
&lt;br /&gt;
 ''' OSStatsURI is the uri to query the OpenSim instance. return same data as the user set uri '''&lt;br /&gt;
 simuri = regiondata['OSStatsURI']&lt;br /&gt;
&lt;br /&gt;
 simdata = simplejson.load(urllib2.urlopen(simuri))&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Allen Kerensky</name></author>	</entry>

	</feed>