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

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