jablonka.czprosek.czf

mapstats

Subversion Repositories:
[/] [doc/] [index.html] - Blame information for rev 3

 

Line No. Rev Author Line
11unreal<html>
2<title>Maptats v3.0 AJAX documentation</title>
3 
4<body>
5<font face="Verdana, Arial, Helvetica" color="#000000" size="2">
6<font size="+1"><b>Mapstats v3.0 AJAX documentation</b></font><br>
7Computer and Links Statistics<br><br>
8<object data="../index.html" type="text/html" width="930" height="600" border="0" style="overflow:hidden; _width:910px;"></object>&nbsp;<hr size="1">
9 
10<font size="3"><b>Basic information</b></font><br>
11First of all check out Mapstats homepage if there is newer version available:<br>
12<a href="http://www.jklir.net/jklir_soubory2/index.php3?p=mapstats">
13http://www.jklir.net/jklir_soubory2/index.php3?p=mapstats</a><br>
14<br>
15 
16Every site stat consist of four to five files. So our testing example will consist of those files:<br>
17<a href="#nodes">name.nodes</a> - list od computers<br>
18<a href="#noping">name.noping</a> - list of computers which you can not ping.<br>
19<a href="#links">name.links</a> - list of links between nodes (optional)<br>
20<a href="#infopoints">name.infopoints</a> - list of info points at map (optional)<br>
21<a href="#state">name.state</a> - actual state of computers (generated by
22MapStats script)<br>
23<br>
24<br>
25 
26You need to create <i>*.nodes</i> , <i>*.noping</i> and <i>*.links </i> file(s) for every site stat. You can
27place as many sites as you want into mapstats directory or create new directory
28with same files. Then just run <i>gen_mapstats</i> and stats will
29be gererated. If you want up to date stats, insert <i>gen_mapstats</i> into cron daemon (for example every
305-10 minutes). No spaces in the files ! All files must exists, if you can not use
31noping, links or infopoints files you must delete content inside<br>
32<br>
33 
34</p>
35 
36<hr size="1">
37 
38<font size="3"><b>Installation</b></font><br>
39<br>
40 
41<b>These programs must be available in the system:</b> awk<br>
42<ul>
43<li>unpack the archive</li>
44<li>move maptats directory to your www directory (or somewhere you want to use it in)</li>
45<li>change path, directories and configuration in 'gen_mapstats'</li>
46<li>if you have fping installed change STATS_TYPE from 'ping' to 'fping' (<a href="http://www.fping.com">www.fping.com</a>) for faster stats generation</li>
47<li>if you have nmap installed change STATS_TYPE from 'ping' to 'nmap' (<a href="http://www.insecure.org/nmap/">www.insecure.org/nmap/</a>) for faster stats generation</li>
48<li>run 'gen_mapstats' to test the configuration</li>
49<li>edit 'name.*' files to match your configuration (sample files are included)</li>
50<li>add 'gen_mapstats' to cron if you want to generate statistics periodically</li>
51</ul>
52 
53<hr size="1">
54 
55<br>
56 
57</font><b>
58<font face="Verdana, Arial, Helvetica" color="#000000">
59Configuration</font></b><font face="Verdana, Arial, Helvetica" color="#000000" size="2"><br>
60<br>
61 
62<b>open index.html in text editor for configuration. There is configuration
63part:</b></font><p>
64<font face="Verdana, Arial, Helvetica" color="#000000" size="2">
65&lt;script type=&quot;text/javascript&quot;&gt;<br>
66&lt;!--<br>
67<br>
68// set full resolution (100%) of map (width and height)<br>
69var full_x = 3100;<br>
70var full_y = 2230;<br>
71<br>
72// set outerDiv resolution (width and height)<br>
73var inres_x = 700;<br>
74var inres_y = 500;<br>
75<br>
76// set magnifier resolution (width and height)<br>
77var magres_x = 150;<br>
78var magres_y = parseInt(full_y / (full_x / magres_x));<br>
79<br>
80// set start position (from left and top)<br>
81var start_left = 110;<br>
82var start_top = 50;<br>
83<br>
84// set zoom multiple<br>
85var eq_mini = 0.33; // 33%<br>
86var eq_medi = 0.5; // 50%<br>
87var eq_high = 0.66; // 66%<br>
88var eq_orig = 1; // 100%<br>
89<br>
90// set start multiple<br>
91var start_mul = eq_mini;<br>
92<br>
93// set displayed functions<br>
94var ch_ap = true;<br>
95var ch_router = true;<br>
96var ch_node = true;<br>
97var ch_infopoint = true;<br>
98var ch_noping = true;<br>
99var ch_legend = true;<br>
100var ch_name = true;<br>
101var ch_ip = true;<br>
102var ch_status = true;<br>
103var ch_backbone = true;<br>
104var ch_client = true;<br>
105var ch_inp = true;<br>
106<br>
107// set source data<br>
108var nodes = 'name.nodes';<br>
109var noping = 'name.noping';<br>
110var links = 'name.links';<br>
111var infopoints = 'name.infopoints';<br>
112var state = 'name.state';<br>
113<br>
114// set colors of links<br>
115var wifi_client = &quot;rgb(0, 200, 0)&quot;;<br>
116var wifi_backbone = &quot;rgb(250, 250, 0)&quot;;<br>
117var eth_100 = &quot;rgb(173, 216, 230)&quot;;<br>
118var fso = &quot;rgb(190, 0, 0)&quot;;<br>
119var fso_backup = &quot;rgb(255, 80, 80)&quot;;<br>
120var ghz5 = &quot;rgb(200, 200, 200)&quot;;<br>
121var ghz10 = &quot;rgb(255, 255, 255)&quot;;<br>
122var fiber = &quot;rgb(220, 0, 220)&quot;;<br>
123var other = &quot;rgb(0, 0, 250)&quot;;<br>
124<br>
125// set alpha colors of links<br>
126var wifi_client_a = &quot;rgba(0, 200, 0, 0.6)&quot;;<br>
127var wifi_backbone_a = &quot;rgba(250, 250, 0, 0.6)&quot;;<br>
128var eth_100_a = &quot;rgba(173, 216, 230, 0.6)&quot;;<br>
129var fso_a = &quot;rgba(190, 0, 0, 0.6)&quot;;<br>
130var fso_backup_a = &quot;rgba(255, 80, 80, 0.6)&quot;;<br>
131var ghz5_a = &quot;rgba(200, 200, 200, 0.6)&quot;;<br>
132var ghz10_a = &quot;rgba(255, 255, 255, 0.6)&quot;;<br>
133var fiber_a = &quot;rgba(220, 0, 220, 0.6)&quot;;<br>
134var other_a = &quot;rgba(0, 0, 250, 0.6)&quot;;<br>
135<br>
136// set names of links<br>
137var name1 = &quot;Wifi Client&quot;;<br>
138var name2 = &quot;Wifi Backbone&quot;;<br>
139var name3 = &quot;Ethernet&quot;;<br>
140var name4 = &quot;FSO&quot;;<br>
141var name5 = &quot;FSO + Backup&quot;;<br>
142var name6 = &quot;5 GHz&quot;;<br>
143var name7 = &quot;10 GHz&quot;;<br>
144var name8 = &quot;Fiber&quot;;<br>
145var name9 = &quot;Other&quot;;<br>
146<br>
147// set name for link in planning (for legend)<br>
148var inp = &quot;(InP)&quot;;<br>
149<br>
150// Let's start it<br>
151window.onload = function() {<br>
152nactiSoubory();<br>
153mapInit(start_mul);<br>
154nastavCheck();<br>
155canvasInit(start_mul);<br>
156timerMe();<br>
157}<br>
158<br>
159// --&gt;<br>
160&lt;/script&gt;</font></p>
161<p>
162<font face="Verdana, Arial, Helvetica" color="#000000" size="2">
163Change it as you wish but be carefull.</p>
164 
165<hr size="1">
166 
167</font>
168<p>
169<font face="Verdana, Arial, Helvetica" color="#000000">
170<b>Create map</b></font><font face="Verdana, Arial, Helvetica" color="#000000" size="2"><br>
171<br>
172 
173You need create you own map. There is 4 scales includes map rects inside (size1
174is the smallest, size4 is the biggest) and one directory with thumbnail of map
175(150 x &lt;count&gt; px). In left top corner is the first rect
176256x256px named &quot;x0y0.jpg&quot;. x is column and y is row. Every rect has
177256px width and 256px height. If the width or height of rect is less then 256px,
178the rect will be smaller. The creation is very hard, so I wrote little PHP
179script which do it all in +- 3 minutes! You only need the biggest map in jpg
180format and configure the function. I recommend size less then 5000 x 5000px. You can download it from <a href="http://www.jklir.net/jklir_soubory2/odkazy/map_cutter.zip">http://www.jklir.net/jklir_soubory2/odkazy/map_cutter.zip</a></p><br>
181 
182<hr size="1">
183 
184</font>
185<p>
186<font face="Verdana, Arial, Helvetica" color="#000000"><b>Display map</b></font><font face="Verdana, Arial, Helvetica" color="#000000" size="2"><br>
187<br>
188 
189The easiest way to display map in existing page is using &lt;object&gt; tag (but
190IE display only white background color)</font></p>
191 
192<pre id="line77"><font face="Verdana, Arial, Helvetica">&lt;object data=&quot;mapstats/index.html&quot; type=&quot;text/html&quot; width=&quot;930&quot; height=&quot;600&quot; border=&quot;0&quot; style=&quot;overflow:hidden; _width:910px;&quot;&gt;&lt;/object&gt;</font></pre>
193 
194<pre id="line77"><font face="Verdana, Arial, Helvetica">(&lt;iframe&gt; tag has problems on IE [some points doesnt draw on the start])</font><font face="Verdana, Arial, Helvetica" color="#000000" size="2"><br><br></pre>
195 
196<hr size="1">
197 
198<a name="nodes">
199<font size="3"><b>*.nodes files</b></font><br>
200computer_name;position_x;position_y;type;IP_address;e-mail<br>
201&nbsp;<p>
202 
203<b>computer_name:</b><br>
204I dont recommend names with diacritic and special characters. Use entities
205without &quot;;&quot; but be very carefull</p>
206<p>
207 
208<b>position_x:</b><br>
209position from left<br>
210<br>
211 
212<b>position_y: </b><br>
213position from top</p>
214<p>
215 
216<b>type:</b><BR>
217AP ... display status, IP address and name with point and waves<br>
218Router ... display status and name with point<br>
219Client ... display only name and point
220</p>
221<p>
222 
223<b>IP address:</b><BR>
224Insert IP address of node, no DNS</p>
225<p>
226 
227<b>e-mail:</b><br>
228Administrator's contact</a> for notification (not work yet - TODO)</p>
229 
230<p>
231 
232<font face="Verdana, Arial, Helvetica" color="#000000" size="1">
233<b><i>Example - name.nodes</i></b><br>
234Unreal;1928;451;Client;10.32.135.151;example@example.cz<br>
235Alderan;764;876;Router;10.32.0.146;example@example.cz<br>
236WESKR;2044;819;Router;10.32.0.141;example@example.cz<br>
237hapri;1935;1407;Router;10.32.0.142;example@example.cz<br>
238Jark;698;792;AP;10.32.0.140;example@example.cz<br>
239Jelinkova;1246;735;AP;10.32.0.138;example@example.cz<br>
240Tomcat;499;1098;AP;10.32.139.139;example@example.cz<br>
241Pospa;1931;628;AP;10.32.0.131;example@example.cz<br>
242Looser;1962;286;AP;10.32.0.135;example@example.cz<br>
243Duch;2058;282;Router;10.32.0.157;example@example.cz<br>
244Jipe;2022;923;AP;10.32.0.132;example@example.cz<br>
245Passi;2090;942;Router;10.32.0.134;example@example.cz<br>
246Kozel;2233;1983;AP;10.33.0.1;example@example.cz<br>
247sluknovska;2897;1239;AP;10.33.0.4;example@example.cz<br>
248jabtoc;2935;1447;AP;10.33.0.21;example@example.cz<br>
249Jablonecka;3070;1593;AP;10.33.0.2;example@example.cz<br>
250Kyselova;1272;1285;AP;10.32.0.147;example@example.cz</font></font></p>
251 
252<font face="Verdana, Arial, Helvetica" color="#000000" size="2">
253 
254<hr size="1">
255 
256<a name="noping">
257<font size="3"><b>*.noping files</b></font><br>
258computer_name;position_x;position_y;type<br>
259<br>
260 
261</a><b>computer_name<a name="config">:</a></b><a name="config"><br>
262I dont recommend names with diacritic and special characters. Use entities
263without &quot;;&quot; but be very carefull<p>
264 
265<b>position_x:</b><br>
266position from left<br>
267<br>
268 
269<b>position_y: </b><br>
270position from top</a></p>
271<p><b>type:</b><br>
2721 ... Client<br>
2732 ... Switch<a name="comp"><br><br>
274 
275 
276If type = 1 the computer_name will show<br>If type = 2 the computer_name will be
277hidden</a></p>
278 
279<p>Noping file(s) is for computers which you can not ping<a name="comp"><br>
280<br>
281 
282<font face="Verdana, Arial, Helvetica" color="#000000" size="1">
283<b><i>Example - name.noping</i></b><br>
284Switch_jipe;2015;891;2<br>
285Havrankova;1705;475;1</font><br>
286 
287</p>
288 
289<hr size="1">
290 
291<a name="links">
292<font size="3"><b>*.links files</b></font><br>
293from_name#to_name;link_weight;is_inplanning;type_of_link<p>
294 
295<b>from_name#to_name:</b><br>
296Put names from nodes or noping file. You can change the name to coordinates or
297add next points for the link (useful for creating fiber optic link) example: [</a><font face="Verdana, Arial, Helvetica" color="#000000" size="1">Jipe#1949&amp;931#1928&amp;900#1563&amp;1027#1594&amp;1124#1531&amp;1149</font>]<a name="config"><br>
298<br>
299 
300<b>link_weight: </b><br>
301Client ...</a> tiny line (3px)<br>Backbone ... thick line (4.5px)</p>
302<p>
303 
304<b>is_inplanning:</b><br>
305INP ... yes, link id in planning and display transparent<br>NO ... no, link is
306normal and dont display transparent<br>
307<br>
308 
309<b>type of link:</b><a name="link"><br>
310<b><font class="form" color="#00c800">WiFi Client</font><font class="form">,</font><font class="form" color="#fafa00"> WiFi Backbone</font><font class="form">,</font></b>
311<b><font class="form" color="#64c8ff">ETH</font><font class="form">,</font><font class="form" color="#64c8ff">
312</font><font class="form" color="#be0000">FSO</font><font class="form">,</font><font class="form" color="#ff5050">&nbsp;&nbsp;FSO
313+ WiFi</font><font class="form">,</font></b> <b>
314<font class="form" color="#c8c8c8">5Ghz</font></b></font><b><font face="Verdana, Arial, Helvetica" size="2">,</font><font face="Verdana, Arial, Helvetica" color="#000000" size="2"><font class="form">&nbsp;</font></font><font class="form"><font face="Verdana, Arial, Helvetica" color="#F0F0F0" size="2">&nbsp;10Ghz</font><font face="Verdana, Arial, Helvetica" size="2">,</font></font></b><font face="Verdana, Arial, Helvetica" color="#000000" size="2"><font face="Verdana, Arial, Helvetica" color="#F0F0F0" size="2">
315 
316</font>
317 
318<b><font class="form" color="#dc00dc">Fiber</font><font class="form">,</font><font class="form" color="#dc00dc">
319</font><font class="form" color="#0000fa">Other</font></b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
3201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
3212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
3223&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
3235&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
3247&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
325&gt;8<br><br>
326 
327<font face="Verdana, Arial, Helvetica" color="#000000" size="1">
328<b><i>Example - name.links</i></b><br>
329Looser#Unreal;Client;NO;1<br>
330Havrankova#Jipe;Client;NO;1<br>
331Jelinkova#Pospa;Backbone;NO;2<br>
332Jelinkova#Tomcat;Backbone;NO;2<br>
333Jelinkova#Alderan;Backbone;NO;2<br>
334Jark#Alderan;Backbone;NO;2<br>
335Jipe#Passi;Backbone;NO;2<br>
336jabtoc#Jablonecka;Backbone;NO;3<br>
337Kyselova#Jark;Backbone;NO;6<br>
338Looser#Duch;Backbone;NO;6<br>
339Looser#WESKR;Backbone;NO;6<br>
340Jelinkova#WESKR;Backbone;NO;6<br>
341Duch#Jipe;Backbone;NO;6<br>
342Duch#2350&amp;0;Backbone;NO;6<br>
343Jipe#Jablonecka;Backbone;NO;6<br>
344sluknovska#Duch;Backbone;NO;6<br>
345sluknovska#jabtoc;Backbone;NO;6<br>
346Kyselova#Kozel;Backbone;NO;6<br>
347Jelinkova#Kyselova;Backbone;NO;6<br>
348Jipe#1949&amp;931#1928&amp;900#1563&amp;1027#1594&amp;1124#1531&amp;1149;Backbone;INP;8<br>
349hapri#Jipe;Client;INP;1<br>
350Switch_jipe#Pospa;Backbone;NO;6<br>
351Switch_jipe#Jipe;Backbone;NO;3</font></p>
352 
353</p>
354 
355<hr size="1">
356 
357</font>
358 
359<font face="Verdana, Arial, Helvetica" color="#000000" size="2">
360 
361</font>
362 
363<a name="infopoints">
364<font face="Verdana, Arial, Helvetica" color="#000000" size="2">
365<font size="3"><b>*.infopoints files</b></font><br>
366name_of_point;position_x;position_y<br>
367</font></a><br>
368 
369<font face="Verdana, Arial, Helvetica" color="#000000" size="2">
370 
371<b>name_of_point:</b><br>
372I dont recommend names with diacritic and special characters. Use entities
373without &quot;;&quot; but be very carefull<p>
374 
375<b>position_x:</b><br>
376position from left<br>
377<br>
378 
379<b>position_y: </b><br>
380position from top<br><br>
381 
382 
383<font face="Verdana, Arial, Helvetica" color="#000000" size="1">
384<b><i>Example - name.infopoints</i></b><br>
385</font>
386</font>
387<font face="Verdana, Arial, Helvetica" size="1">Restaurace Na
388Vyhlidce;673;804<br>
389Vinarna U Kocoura;762;1054<br>
390Bar Las Vegas;1536;1198<br>
391Bar Wild Jack;1490;1228<br>
392Restaurace Na Melnicke;2021;600<br>
393Zernosecka;1614;736</font></p>
394<font face="Verdana, Arial, Helvetica" color="#000000" size="2">
395 
396<hr size="1">
397 
398</font>
399<font face="Verdana, Arial, Helvetica" color="#000000" size="2">
400 
401<a name="state">
402<font size="3"><b>*.state files</b></font><br>
403ip_address;number_of_pings_received(if >0 => computer is green, otherwise red);latency<br>
404<br>
405 
406<font face="Verdana, Arial, Helvetica" color="#000000" size="1">
407<b><i>Example - name.state</i></b><br>
40810.32.135.151;1;2.684<br>
40910.32.0.146;1;3.539<br>
41010.32.0.141;1;1.085<br>
41110.32.0.142;0;0<br>
41210.32.0.140;1;3.385<br>
41310.32.0.138;1;1.818<br>
41410.32.139.139;0;0<br>
41510.32.0.131;1;1.593<br>
41610.32.0.135;1;0.540<br>
41710.32.0.157;1;0.180<br>
41810.32.0.132;1;1.208<br>
41910.32.0.134;0;0<br>
42010.33.0.1;1;2.757<br>
42110.33.0.4;1;1.065<br>
42210.33.0.21;1;2.257<br>
42310.33.0.2;1;2.050<br>
42410.32.0.147;1;2.555<br>
425<br>
426</font>
427<br>
428 
429<hr size="1">
430 
431(c)2008 by <a href="http://www.jklir.net">Unreal][</a> &amp; <a href="http://www.mobilnews.cz/honza/en_prog_linux_calstats.php">Jan Krupa</a>.<br>
432<br>
433 
434</font>
435</body>
436</html>

Powered by WebSVN 2.2.1