slitaz-forge view pangolin/web/index.php @ rev 708

s/pizza.slitaz.me/mypizza.slitaz.org/
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Dec 14 17:16:32 2019 +0100 (2019-12-14)
parents a84a8415f54b
children 61a312917e44
line source
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>SliTaz Pangolin</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="slitaz pangolin server" />
8 <meta name="robots" content="index, nofollow" />
9 <meta name="author" content="SliTaz Contributors" />
10 <link rel="shortcut icon" href="favicon.ico" />
11 <link rel="stylesheet" type="text/css" href="slitaz.css" />
12 </head>
13 <body>
15 <!-- Header -->
16 <div id="header">
17 <div id="logo"></div>
18 <div id="network">
19 <a href="http://www.slitaz.org/">Home</a>
20 <a href="http://scn.slitaz.org/">Community</a>
21 <a href="http://doc.slitaz.org/">Doc</a>
22 <a href="http://forum.slitaz.org/">Forum</a>
23 <a href="http://irc.slitaz.org/">IRC</a>
24 <a href="http://shop.slitaz.org/">Shop</a>
25 <a href="http://bugs.slitaz.org">Bugs</a>
26 <a href="http://hg.slitaz.org/?sort=lastchange">Hg</a>
27 </div>
28 <h1><a href="http://www.slitaz.org/">SliTaz Pangolin</a></h1>
29 </div>
31 <!-- Block -->
32 <div id="block">
33 <!-- Navigation -->
34 <div id="block_nav">
35 <h4><img src="images/development.png" alt="development.png" />Developers Corner</h4>
36 <div class="right_box">
37 <ul>
38 <li><a href="http://tank.slitaz.org/">Tank Server</a></li>
39 <li><a href="http://mirror1.slitaz.org/">Main Mirror</a></li>
40 <li><a href="http://pangolin.slitaz.org/console/">Console</a></li>
41 </ul>
42 </div>
43 <div class="left_box">
44 <ul>
45 <li><a href="http://www.slitaz.org/en/devel/">Devel Doc</a></li>
46 <li><a href="http://people.slitaz.org/">SliTaz People</a></li>
47 <li><a href="http://cook.slitaz.org/">Cooker</a></li>
48 <li><a href="http://mypizza.slitaz.org/">Pizza Builder</a></li>
49 </ul>
50 </div>
51 </div>
52 <!-- Information/image -->
53 <div id="block_info">
54 <h4>Codename: pangolin - Maintainer: erjo</h4>
55 <p>
56 This is the SliTaz GNU/Linux main server and build host.
57 The server runs naturally SliTaz and provides some services
58 to all contributors.
59 </p>
60 <p>
61 Pangolin CPU is a <?php system("sed -e '/^model name/!d;s/.*Intel(R) //;" .
62 "s/@//;s/(.*)//;s/CPU //;s/.*AMD //;s/.*: //;s/Processor //' </proc/cpuinfo |" .
63 " awk '{ s=$0; n++ } END { if (n == 2) printf \"dual \";" .
64 "if (n == 4) printf \"quad \"; print s }' ")?> -
65 <?php system("free | awk '/Mem:/ { x=2*$2-1; while (x >= 1024) { x /= 1024; ".
66 "n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ".
67 "printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?>
68 - Located in Paris,
69 France. Pangolin is also monitored by RRDtool which provides
70 <a href="graphs.php">graphical stats</a>.
71 </p>
72 </div>
73 </div>
75 <!-- Content -->
76 <div id="content">
78 <h2><a href="graphs.php"><img
79 style="vertical-align: middle; padding: 0 4px 4px 0;"
80 title="Pangolin RRDtool graphs" alt="graphs"
81 src="images/monitor.png" /></a>System stats</h2>
83 <h4>Uptime</h4>
85 <pre class="package">
86 <?php
87 system("uptime | sed 's/^\s*//'");
88 ?>
89 </pre>
91 <h4>Disk usage</h4>
92 <pre class="package">
93 <?php
94 system("[ -d /sys/block ] && [ -x /usr/sbin/smartctl ] && { cd /sys/block ; for i in [hs]d? ; do echo -n \$i ; /usr/sbin/smartctl -a /dev/\$i 2> /dev/null | sed '/Power_On_Hours/{s/.*Pow/: Pow/;s/ours.*-/ours/;p};/offline/!d;q'; echo; done; }");
95 system("df -h | sed '/^rootfs/d' | grep '\(^/dev\|Filesystem\)'");
96 ?>
97 </pre>
99 <h4>Network</h4>
100 <pre class="package">
101 <?php
102 system("ifconfig eth0 | awk '{ if (/X packet/ || /X byte/) print }' | sed 's/^\s*//'");
103 ?>
104 </pre>
106 <h2><a href="/stats/awstats.pl?config=www.slitaz.org"><img
107 style="vertical-align: middle; padding: 0 4px 4px 0;"
108 title="Pangolin Virtual hosts" alt="vhosts"
109 src="images/network.png" /></a>Virtual hosts</h2>
111 <ul>
112 <li><a href="http://www.slitaz.org/">www.slitaz.org</a> - SliTaz Website.
113 (<a href="/stats/awstats.pl?config=www.slitaz.org">stats</a>)</li>
114 <li><a href="http://doc.slitaz.org/">doc.slitaz.org</a> - Documentation platform.</li>
115 <li><a href="http://forum.slitaz.org/">forum.slitaz.org</a> - SliTaz support forum.</li>
116 <li><a href="http://vanilla.slitaz.org/">vanilla.slitaz.org</a> - previous SliTaz forum.</li>
117 <li><a href="http://hg.slitaz.org/">hg.slitaz.org</a> - Mercurial repositories.</li>
118 <li><a href="http://mypizza.slitaz.org/">mypizza.slitaz.org</a> - SliTaz flavor builder.</li>
119 </ul>
121 <h2><img
122 style="vertical-align: middle; padding: 0 4px 4px 0;"
123 title="Erjo Virtual hosts" alt="vhosts"
124 src="images/network.png" />Other hosts</h2>
126 <p>
127 These services are hosted by some individual sponsors who gracefully offer
128 resources to the SliTaz project.
129 </p>
130 <ul>
131 <li><a href="http://mirror.slitaz.org/">mirror1.slitaz.org</a> - SliTaz main mirror and replicas.
132 (<a href="http://mirror1.slitaz.org/info/">more...</a>)</li>
133 <li><a href="http://pkgs.slitaz.org/">pkgs.slitaz.org</a> - Packages Web interface.</li>
134 <li><a href="http://tiny.slitaz.org/">tiny.slitaz.org</a> - Tiny SliTaz builder.</li>
135 <!-- ajaxterm archives console-mirror demo dvd floppy ssh usbkey -->
136 <li><a href="http://boot.slitaz.org/">boot.slitaz.org</a> - gPXE Web boot.</li>
137 <li><a href="http://cook.slitaz.org/">cook.slitaz.org</a> - SliTaz Build Bot.</li>
138 <li><a href="http://people.slitaz.org/">people.slitaz.org</a> - SliTaz People stuff.</li>
139 <li><a href="http://pro.slitaz.org/">pro.slitaz.org</a> - SliTaz Professional services.</li>
140 <li><a href="http://scn.slitaz.org/">scn.slitaz.org</a> - Community platform.</li>
141 <!-- ssfs stats store tank -->
142 </ul>
144 <a name="mirrors"></a>
145 <h2><a href="http://mirror1.slitaz.org/info/"> <img
146 style="vertical-align: middle; padding: 0 4px 4px 0;"
147 src="images/network.png"
148 title="Secondary mirrors" alt="mirrors" /></a>Mirrors</h2>
149 Most mirrors are updated using the url: <b>rsync://mirror1.slitaz.org/slitaz/</b>
150 (<a href="http://mirror1.slitaz.org/awstats.pl?config=rsync">stats</a>)
151 <pre>
152 rsync -azH --delete rsync://mirror1.slitaz.org/slitaz/ /local/slitaz/mirror/ </pre>
153 New mirrors should be announced on the
154 <a href="http://www.slitaz.org/en/mailing-list.html">mailing list</a>.
155 <ul>
156 <?php
157 $output_url_file="";
158 $output_url_handler;
159 $mirrors_url_file="./mirrors";
161 function test_url($link, $proto)
162 {
163 global $output_url_file;
164 global $mirrors_url_file;
165 global $output_url_handler;
167 if ($output_url_file != "") {
168 switch($proto) {
169 case "http" :
170 case "ftp" :
171 $cmd = "busybox wget -s $link/README" ;
172 break;
173 case "rsync" :
174 $cmd = "rsync $link > /dev/null 2>&1" ;
175 break;
176 default :
177 return FALSE;
178 }
179 if (shell_exec("$cmd && echo -n OK") == "OK") {
180 fwrite($output_url_handler,$link."\n");
181 return TRUE;
182 }
183 return FALSE;
184 }
185 return shell_exec("grep -qs ^$link$ $mirrors_url_file && echo -n OK") == "OK";
186 }
188 if (! file_exists($mirrors_url_file)) {
189 $output_url_file = tempnam('/tmp','mkmirrors');
190 $output_url_handler = fopen($output_url_file, "w");
191 fwrite($output_url_handler,"http://mirror1.slitaz.org/\n");
192 fwrite($output_url_handler,"rsync://mirror1.slitaz.org/\n");
193 }
195 # Flags icons from http://www.famfamfam.com/lab/icons/flags/famfamfam_flag_icons.zip
196 foreach (array(
197 array( "flag" => "ch",
198 "http" => "http://mirror.switch.ch/ftp/mirror/slitaz/",
199 "ftp" => "ftp://mirror.switch.ch/mirror/slitaz/"),
200 array( "flag" => "us",
201 "http" => "http://www.gtlib.gatech.edu/pub/slitaz/",
202 "ftp" => "ftp://ftp.gtlib.gatech.edu/pub/slitaz/",
203 "rsync" => "rsync://www.gtlib.gatech.edu/slitaz/"),
204 array( "flag" => "fr",
205 "http" => "http://download.tuxfamily.org/slitaz/",
206 "ftp" => "ftp://download.tuxfamily.org/slitaz/",
207 "rsync" => "rsync://download.tuxfamily.org/pub/slitaz/"),
208 array( "flag" => "fr",
209 "http" => "http://www.linuxembarque.com/slitaz/mirror/"),
210 array( "flag" => "cn",
211 "http" => "http://mirror.lupaworld.com/slitaz/"),
212 array( "flag" => "cn",
213 "http" => "http://ks.lupaworld.com/slitaz/"),
214 array( "flag" => "br",
215 "http" => "http://slitaz.c3sl.ufpr.br/",
216 "ftp" => "ftp://slitaz.c3sl.ufpr.br/slitaz/",
217 "rsync" => "rsync://slitaz.c3sl.ufpr.br/slitaz/"),
218 array( "flag" => "it",
219 "http" => "http://slitaz.mirror.garr.it/mirrors/slitaz/",
220 "ftp" => "ftp://slitaz.mirror.garr.it/mirrors/slitaz/",
221 "rsync" => "rsync://slitaz.mirror.garr.it/mirrors/slitaz/"),
222 array( "flag" => "si",
223 "http" => "http://mirror.drustvo-dns.si/slitaz/"),
224 array( "flag" => "si",
225 "ftp" => "ftp://ftp.pina.si/slitaz/"),
226 array( "flag" => "us",
227 "http" => "http://distro.ibiblio.org/pub/linux/distributions/slitaz/",
228 "ftp" => "ftp://distro.ibiblio.org/pub/linux/distributions/slitaz/"),
229 array( "flag" => "nl",
230 "http" => "http://ftp.vim.org/ftp/os/Linux/distr/slitaz/",
231 "ftp" => "ftp://ftp.vim.org/mirror/os/Linux/distr/slitaz/"),
232 array( "flag" => "nl",
233 "http" => "http://ftp.nedit.org/ftp/ftp/pub/os/Linux/distr/slitaz/",
234 "ftp" => "ftp://ftp.nedit.org/ftp/ftp/pub/os/Linux/distr/slitaz/"),
235 array( "flag" => "ch",
236 "http" => "http://ftp.ch.xemacs.org/ftp/pool/4/mirror/slitaz/",
237 "ftp" => "ftp://ftp.ch.xemacs.org//pool/4/mirror/slitaz/"),
238 array( "flag" => "de",
239 "http" => "http://ftp.uni-stuttgart.de/slitaz/",
240 "ftp" => "ftp://ftp.uni-stuttgart.de/slitaz/"),
241 array( "flag" => "ro",
242 "http" => "http://ftp.info.uvt.ro/pub/slitaz/",
243 "ftp" => "ftp://ftp.info.uvt.ro/pub/slitaz/",
244 "rsync" => "rsync://ftp.info.uvt.ro/ftp/pub/slitaz/"),
245 array( "flag" => "au",
246 "http" => "http://mirror.iprimus.com/slitaz/"),
247 array( "flag" => "au",
248 "http" => "http://mirror01.ipgn.com.au/slitaz/"),
249 array( "flag" => "us",
250 "http" => "http://mirror.clarkson.edu/slitaz/",
251 "rsync" => "rsync://mirror.clarkson.edu/slitaz/")) as $mirror) {
252 $flag = "pics/website/".$mirror["flag"].".png";
253 $head = TRUE;
254 foreach(array("http", "ftp", "rsync") as $proto) {
255 if (!isset($mirror[$proto])) continue;
256 $link = $mirror[$proto];
257 if (!test_url($link, $proto)) continue;
258 $serveur = parse_url($link, PHP_URL_HOST);
259 if ($head) echo <<<EOT
260 <li><a href="http://en.utrace.de/?query=$serveur">
261 <img title="map" src="$flag" alt="map" /></a>
262 <a href="$link">$link</a>
263 EOT;
264 else echo <<<EOT
265 or <a href="$link">$proto</a>
266 EOT;
267 $head = FALSE;
268 }
269 if ($head) continue;
270 echo " </li>\n";
271 }
273 if ($output_url_file != "") {
274 fclose($output_url_handler);
275 rename($output_url_file, $mirrors_url_file);
276 chmod($mirrors_url_file, 0644);
277 }
279 ?>
280 </ul>
282 <!-- End of content -->
283 </div>
285 <!-- Footer -->
286 <div id="footer">
287 Copyright &copy; <span class="year"></span>
288 <a href="http://www.slitaz.org/">SliTaz</a> - Network:
289 <a href="http://scn.slitaz.org/">Community</a>
290 <a href="http://doc.slitaz.org/">Doc</a>
291 <a href="http://forum.slitaz.org/">Forum</a>
292 <a href="http://pkgs.slitaz.org/">Packages</a>
293 <a href="http://bugs.slitaz.org">Bugs</a>
294 <a href="http://hg.slitaz.org/">Hg</a>
295 <p>
296 SliTaz @
297 <a href="http://twitter.com/slitaz">Twitter</a>
298 <a href="http://www.facebook.com/slitaz">Facebook</a>
299 <a href="http://distrowatch.com/slitaz">Distrowatch</a>
300 <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a>
301 <a href="http://flattr.com/profile/slitaz">Flattr</a>
302 </p>
303 </div>
305 </body>
306 </html>