<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.w9cr.net/index.php?action=history&amp;feed=atom&amp;title=Stats_Server</id>
	<title>Stats Server - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.w9cr.net/index.php?action=history&amp;feed=atom&amp;title=Stats_Server"/>
	<link rel="alternate" type="text/html" href="https://wiki.w9cr.net/index.php?title=Stats_Server&amp;action=history"/>
	<updated>2026-05-30T08:09:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.4</generator>
	<entry>
		<id>https://wiki.w9cr.net/index.php?title=Stats_Server&amp;diff=4528&amp;oldid=prev</id>
		<title>Bryan: Created page with &quot;Status server  Requires graphviz  This consists of several C programs as CGI's and uses LMDB to store data nodes post to the server.   The source is under /usr/local/src/statu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.w9cr.net/index.php?title=Stats_Server&amp;diff=4528&amp;oldid=prev"/>
		<updated>2019-11-29T15:48:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Status server  Requires graphviz  This consists of several C programs as CGI&amp;#039;s and uses LMDB to store data nodes post to the server.   The source is under /usr/local/src/statu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Status server&lt;br /&gt;
&lt;br /&gt;
Requires graphviz&lt;br /&gt;
&lt;br /&gt;
This consists of several C programs as CGI's and uses LMDB to store data nodes post to the server. &lt;br /&gt;
&lt;br /&gt;
The source is under /usr/local/src/status &lt;br /&gt;
&lt;br /&gt;
* index.cgi - generates the code for the index page and textual output&lt;br /&gt;
* uhandler.cgi - receives the http get requests of data from the nodes and writes it to the LMDB&lt;br /&gt;
* nodeinfo.cgi - gives the per node report text page&lt;br /&gt;
* getconn.cgi - not really needed for the user interface.  ?$NODE returns text with the total number of connected nodes and the state of each connected node separated by pipes&lt;br /&gt;
* statsdb.cgi - not needed for the interface.  If the compiled in IP is matched, it will return a dump of the database.  &lt;br /&gt;
* jsondata.cgi - not needed for the interface, used for returning JSON formated node data from database.&lt;br /&gt;
* getstatus.cgi - generates the per node PNG image using getstatus and neato.  This is a bash script. &lt;br /&gt;
* graphic-status.html - used to display the big network wide graph&lt;br /&gt;
&lt;br /&gt;
These next are not publicly accessible files and are called by the system for generating the various parts of the config.  &lt;br /&gt;
&lt;br /&gt;
These must be installed under /var/www/stats-private&lt;br /&gt;
* updatenodesdb - updates the database from the registration server.  The registration server must permit this.&lt;br /&gt;
&lt;br /&gt;
* dostatus - executed from roots crontab, and makes the overall network PNG&lt;br /&gt;
&lt;br /&gt;
* mkstatslmdb - makes the raw stats LMDB if not there, might be good to run on boot &lt;br /&gt;
* mkstatus - used by dostatus, it makes the text data that neato uses to make the large graph &lt;br /&gt;
* getstatus - used by getstatus.cgi, it makes the text data neato uses to build the per node graph &lt;br /&gt;
* /var/www/stats-private/stats-lmdb - location of the LMDB database.  This should be compiled in. &lt;br /&gt;
For speed we can run the stats db on a tempfs in memory.  I've disabled this for now.  but it could be enabled in /etc/fstab.&lt;br /&gt;
&lt;br /&gt;
'''Note: The db hangs from time to time and one needs to run a cron job of /usr/local/src/liblmdb/mdb_stat -rr /var/www/stats-private/stats-lmdb to clear the stale readers. see: http://www.lmdb.tech/doc/index.html'''&lt;br /&gt;
&lt;br /&gt;
[[Category: Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Bryan</name></author>
		
	</entry>
</feed>