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

pangolin/web/index.php: add games.slitaz.org
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Oct 25 17:27:46 2021 +0000 (2021-10-25)
parents cfad9fa3f53c
children
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://bugs.slitaz.org">Bugs</a>
25 <a href="http://hg.slitaz.org/?sort=lastchange">Hg</a>
26 </div>
27 <h1><a href="http://www.slitaz.org/">SliTaz Pangolin</a></h1>
28 </div>
30 <!-- Block -->
31 <div id="block">
32 <!-- Navigation -->
33 <div id="block_nav">
34 <h4><img src="images/development.png" alt="development.png" />Developers Corner</h4>
35 <div class="right_box">
36 <ul>
37 <li><a href="http://tank.slitaz.org/">Tank Server</a></li>
38 <li><a href="http://mirror1.slitaz.org/">Main Mirror</a></li>
39 <li><a href="http://mypizza.slitaz.org/">Pizza Builder</a></li>
40 </ul>
41 </div>
42 <div class="left_box">
43 <ul>
44 <li><a href="http://www.slitaz.org/en/devel/">Devel Doc</a></li>
45 <li><a href="http://people.slitaz.org/">SliTaz People</a></li>
46 <li><a href="http://cook.slitaz.org/">Cooker</a></li>
47 </ul>
48 </div>
49 </div>
50 <!-- Information/image -->
51 <div id="block_info">
52 <h4>Codename: pangolin - Maintainer: erjo</h4>
53 <p>
54 This is the SliTaz GNU/Linux main server and build host.
55 The server runs naturally SliTaz and provides some services
56 to all contributors. The virtual machine is gracefully hosted by
57 <a href="https://www.linkedin.com/company/balinor-technologies/">balinor-technologies</a>.
58 </p>
59 <p>
60 Pangolin CPU is a <?php system("sed -e '/^model name/!d;s/.*Intel(R) //;" .
61 "s/@//;s/(.*)//;s/CPU //;s/.*AMD //;s/.*: //;s/Processor //' </etc/cpuinfo |" .
62 " awk '{ s=$0; n++ } END { if (n == 2) printf \"dual \";" .
63 "if (n == 4) printf \"quad \"; print s }' ")?> -
64 <?php system("free | awk '/Mem:/ { x=2*$2-1; while (x >= 1024) { x /= 1024; ".
65 "n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ".
66 "printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?>
67 - Located in Paris,
68 France. Pangolin is also monitored by RRDtool which provides
69 <a href="graphs.php">graphical stats</a>.
70 </p>
71 </div>
72 </div>
74 <!-- Content -->
75 <div id="content">
77 <h2><a href="graphs.php"><img
78 style="vertical-align: middle; padding: 0 4px 4px 0;"
79 title="Pangolin RRDtool graphs" alt="graphs"
80 src="images/monitor.png" /></a>System stats</h2>
82 <h4>Uptime</h4>
84 <pre class="package">
85 <?php
86 system("uptime | sed 's/^\s*//'");
87 ?>
88 </pre>
90 <h4>Disk usage</h4>
91 <pre class="package">
92 <?php
93 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; }");
94 system("df -h | sed '/^rootfs/d' | grep '\(^/dev\|Filesystem\)'");
95 ?>
96 </pre>
98 <h4>Network</h4>
99 <pre class="package">
100 <?php
101 system("ifconfig eth0 | awk '{ if (/X packet/ || /X byte/) print }' | sed 's/^\s*//'");
102 ?>
103 </pre>
105 <h2><a href="/stats/awstats.pl?config=www.slitaz.org"><img
106 style="vertical-align: middle; padding: 0 4px 4px 0;"
107 title="Pangolin Virtual hosts" alt="vhosts"
108 src="images/network.png" /></a>Virtual hosts</h2>
110 <ul>
111 <li><a href="http://www.slitaz.org/">www.slitaz.org</a> - SliTaz Website.
112 (<a href="/stats/awstats.pl?config=www.slitaz.org">stats</a>)</li>
113 <li><a href="http://doc.slitaz.org/">doc.slitaz.org</a> - Documentation platform.
114 (<a href="/stats/awstats.pl?config=doc.slitaz.org">stats</a>)</li>
115 <li><a href="http://forum.slitaz.org/">forum.slitaz.org</a> - SliTaz support forum.
116 (<a href="/stats/awstats.pl?config=forum.slitaz.org">stats</a>)</li>
117 <li><a href="http://vanilla.slitaz.org/">vanilla.slitaz.org</a> - previous SliTaz forum.
118 (<a href="/stats/awstats.pl?config=vanilla.slitaz.org">stats</a>)</li>
119 <li><a href="http://hg.slitaz.org/">hg.slitaz.org</a> - Mercurial repositories.
120 (<a href="/stats/awstats.pl?config=repos.slitaz.org">stats</a>)</li>
121 <li><a href="http://mypizza.slitaz.org/">mypizza.slitaz.org</a> - SliTaz flavor builder.
122 (<a href="/stats/awstats.pl?config=pizza.slitaz.me">stats</a>)
123 <li><a href="http://paste.slitaz.org/">paste.slitaz.org</a> - SliTaz encrypted paste tool.
124 (<a href="/stats/awstats.pl?config=paste.slitaz.org">stats</a>)
125 <li><a href="http://games.slitaz.org/">games.slitaz.org</a> - Tiny javascript games.
126 (<a href="/stats/awstats.pl?config=games.slitaz.org">stats</a>)
127 </ul>
129 <h2><img
130 style="vertical-align: middle; padding: 0 4px 4px 0;"
131 title="Erjo Virtual hosts" alt="vhosts"
132 src="images/network.png" />Other hosts</h2>
134 <p>
135 These services are hosted by some individual sponsors who gracefully offer
136 resources to the SliTaz project.
137 </p>
138 <ul>
139 <li><a href="http://mirror.slitaz.org/">mirror1.slitaz.org</a> - SliTaz main mirror and replicas.
140 (<a href="http://mirror1.slitaz.org/info/">more...</a>)</li>
141 <li><a href="http://pkgs.slitaz.org/">pkgs.slitaz.org</a> - Packages Web interface.</li>
142 <li><a href="http://tiny.slitaz.org/">tiny.slitaz.org</a> - Tiny SliTaz builder.</li>
143 <!-- ajaxterm archives console-mirror demo dvd floppy ssh usbkey -->
144 <li><a href="http://boot.slitaz.org/">boot.slitaz.org</a> - gPXE Web boot.</li>
145 <li><a href="http://cook.slitaz.org/">cook.slitaz.org</a> - SliTaz Build Bot.</li>
146 <li><a href="http://people.slitaz.org/">people.slitaz.org</a> - SliTaz People stuff.</li>
147 <li><a href="http://pro.slitaz.org/">pro.slitaz.org</a> - SliTaz Professional services.</li>
148 <li><a href="http://scn.slitaz.org/">scn.slitaz.org</a> - Community platform.</li>
149 <!-- ssfs stats store tank -->
150 </ul>
152 <a name="mirrors"></a>
153 <h2><a href="http://mirror1.slitaz.org/info/"> <img
154 style="vertical-align: middle; padding: 0 4px 4px 0;"
155 src="images/network.png"
156 title="Secondary mirrors" alt="mirrors" /></a>Mirrors</h2>
157 Most mirrors are updated using the url: <b>rsync://mirror1.slitaz.org/slitaz/</b>
158 (<a href="http://mirror1.slitaz.org/awstats.pl?config=rsync">stats</a>)
159 <pre>
160 rsync -azH --delete rsync://mirror1.slitaz.org/slitaz/ /local/slitaz/mirror/ </pre>
161 New mirrors should be announced on the
162 <a href="http://www.slitaz.org/en/mailing-list.html">mailing list</a>.
163 <ul>
164 <?php
165 $output_url_file="";
166 $output_url_handler;
167 $mirrors_url_file="./mirrors";
169 function test_url($link, $proto)
170 {
171 global $output_url_file;
172 global $mirrors_url_file;
173 global $output_url_handler;
175 if ($output_url_file != "") {
176 switch($proto) {
177 case "http" :
178 case "ftp" :
179 $cmd = "busybox wget -s $link/README" ;
180 break;
181 case "rsync" :
182 $cmd = "rsync $link > /dev/null 2>&1" ;
183 break;
184 default :
185 return FALSE;
186 }
187 if (shell_exec("$cmd && echo -n OK") == "OK") {
188 fwrite($output_url_handler,$link."\n");
189 return TRUE;
190 }
191 return FALSE;
192 }
193 return shell_exec("grep -qs ^$link$ $mirrors_url_file && echo -n OK") == "OK";
194 }
196 if (! file_exists($mirrors_url_file)) {
197 $output_url_file = tempnam('/tmp','mkmirrors');
198 $output_url_handler = fopen($output_url_file, "w");
199 fwrite($output_url_handler,"http://mirror1.slitaz.org/\n");
200 fwrite($output_url_handler,"rsync://mirror1.slitaz.org/\n");
201 }
203 # Flags icons from http://www.famfamfam.com/lab/icons/flags/famfamfam_flag_icons.zip
204 foreach (array(
205 array( "flag" => "us",
206 "http" => "http://www.gtlib.gatech.edu/pub/slitaz/",
207 "ftp" => "ftp://ftp.gtlib.gatech.edu/pub/slitaz/",
208 "rsync" => "rsync://www.gtlib.gatech.edu/slitaz/"),
209 array( "flag" => "fr",
210 "http" => "http://download.tuxfamily.org/slitaz/",
211 "ftp" => "ftp://download.tuxfamily.org/slitaz/",
212 "rsync" => "rsync://download.tuxfamily.org/pub/slitaz/"),
213 array( "flag" => "fr",
214 "http" => "http://www.linuxembarque.com/slitaz/mirror/"),
215 array( "flag" => "cn",
216 "http" => "http://mirror.lupaworld.com/slitaz/"),
217 array( "flag" => "cn",
218 "http" => "http://ks.lupaworld.com/slitaz/"),
219 array( "flag" => "br",
220 "http" => "http://slitaz.c3sl.ufpr.br/",
221 "rsync" => "rsync://slitaz.c3sl.ufpr.br/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" => "de",
233 "http" => "http://ftp.uni-stuttgart.de/slitaz/",
234 "ftp" => "ftp://ftp.uni-stuttgart.de/slitaz/"),
235 array( "flag" => "de",
236 "ftp" => "ftp://fb04272.mathematik.tu-darmstadt.de/pub/linux/distributions/slitaz/",
237 "ftp" => "ftp://linux.mathematik.tu-darmstadt.de/pub/linux/distributions/misc/slitaz/"),
238 array( "flag" => "pl",
239 "ftp" => "ftp://ftp.icm.edu.pl/vol/rzm5/linux-ibiblio/distributions/slitaz/"),
240 array( "flag" => "au",
241 "http" => "http://mirror.iprimus.com/slitaz/"),
242 array( "flag" => "fr",
243 "http" => "https://dl.aurorafoss.org/slitaz/"),
244 array( "flag" => "us",
245 "http" => "http://mirror.math.princeton.edu/pub/slitaz/"),
246 array( "flag" => "us",
247 "http" => "http://mirror.clarkson.edu/slitaz/",
248 "rsync" => "rsync://mirror.clarkson.edu/slitaz/")) as $mirror) {
249 $flag = "pics/website/".$mirror["flag"].".png";
250 $head = TRUE;
251 foreach(array("http", "ftp", "rsync") as $proto) {
252 if (!isset($mirror[$proto])) continue;
253 $link = $mirror[$proto];
254 $serveur = parse_url($link, PHP_URL_HOST);
255 if (!test_url($link, $proto)) continue;
256 #if (!test_url($link, $proto)) $link2 = "<del>".$link."</del>";
257 #else $link2 = $link;
258 if ($head) echo <<<EOT
259 <li><a href="http://en.utrace.de/?query=$serveur">
260 <img title="map" src="$flag" alt="map" /></a>
261 <a href="$link">$link</a>
262 EOT;
263 else echo <<<EOT
264 or <a href="$link">$proto</a>
265 EOT;
266 $head = FALSE;
267 }
268 if ($head) continue;
269 echo " </li>\n";
270 }
272 if ($output_url_file != "") {
273 fclose($output_url_handler);
274 rename($output_url_file, $mirrors_url_file);
275 chmod($mirrors_url_file, 0644);
276 }
278 ?>
279 </ul>
281 <!-- End of content -->
282 </div>
284 <!-- Footer -->
285 <div id="footer">
286 Copyright &copy; <span class="year"></span>
287 <a href="http://www.slitaz.org/">SliTaz</a> - Network:
288 <a href="http://scn.slitaz.org/">Community</a>
289 <a href="http://doc.slitaz.org/">Doc</a>
290 <a href="http://forum.slitaz.org/">Forum</a>
291 <a href="http://pkgs.slitaz.org/">Packages</a>
292 <a href="http://bugs.slitaz.org">Bugs</a>
293 <a href="http://hg.slitaz.org/">Hg</a>
294 <p>
295 SliTaz @
296 <a href="http://twitter.com/slitaz">Twitter</a>
297 <a href="http://www.facebook.com/slitaz">Facebook</a>
298 <a href="http://distrowatch.com/slitaz">Distrowatch</a>
299 <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a>
300 <a href="http://flattr.com/profile/slitaz">Flattr</a>
301 </p>
302 </div>
304 </body>
305 </html>