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

Update pangolin
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jan 01 18:26:56 2020 +0100 (2020-01-01)
parents 17ab49508a9f
children 9e7953989d74
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://mypizza.slitaz.org/">Pizza Builder</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 </ul>
49 </div>
50 </div>
51 <!-- Information/image -->
52 <div id="block_info">
53 <h4>Codename: pangolin - Maintainer: erjo</h4>
54 <p>
55 This is the SliTaz GNU/Linux main server and build host.
56 The server runs naturally SliTaz and provides some services
57 to all contributors.
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 //' </proc/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 </ul>
127 <h2><img
128 style="vertical-align: middle; padding: 0 4px 4px 0;"
129 title="Erjo Virtual hosts" alt="vhosts"
130 src="images/network.png" />Other hosts</h2>
132 <p>
133 These services are hosted by some individual sponsors who gracefully offer
134 resources to the SliTaz project.
135 </p>
136 <ul>
137 <li><a href="http://mirror.slitaz.org/">mirror1.slitaz.org</a> - SliTaz main mirror and replicas.
138 (<a href="http://mirror1.slitaz.org/info/">more...</a>)</li>
139 <li><a href="http://pkgs.slitaz.org/">pkgs.slitaz.org</a> - Packages Web interface.</li>
140 <li><a href="http://tiny.slitaz.org/">tiny.slitaz.org</a> - Tiny SliTaz builder.</li>
141 <!-- ajaxterm archives console-mirror demo dvd floppy ssh usbkey -->
142 <li><a href="http://boot.slitaz.org/">boot.slitaz.org</a> - gPXE Web boot.</li>
143 <li><a href="http://cook.slitaz.org/">cook.slitaz.org</a> - SliTaz Build Bot.</li>
144 <li><a href="http://people.slitaz.org/">people.slitaz.org</a> - SliTaz People stuff.</li>
145 <li><a href="http://pro.slitaz.org/">pro.slitaz.org</a> - SliTaz Professional services.</li>
146 <li><a href="http://scn.slitaz.org/">scn.slitaz.org</a> - Community platform.</li>
147 <!-- ssfs stats store tank -->
148 </ul>
150 <a name="mirrors"></a>
151 <h2><a href="http://mirror1.slitaz.org/info/"> <img
152 style="vertical-align: middle; padding: 0 4px 4px 0;"
153 src="images/network.png"
154 title="Secondary mirrors" alt="mirrors" /></a>Mirrors</h2>
155 Most mirrors are updated using the url: <b>rsync://mirror1.slitaz.org/slitaz/</b>
156 (<a href="http://mirror1.slitaz.org/awstats.pl?config=rsync">stats</a>)
157 <pre>
158 rsync -azH --delete rsync://mirror1.slitaz.org/slitaz/ /local/slitaz/mirror/ </pre>
159 New mirrors should be announced on the
160 <a href="http://www.slitaz.org/en/mailing-list.html">mailing list</a>.
161 <ul>
162 <?php
163 $output_url_file="";
164 $output_url_handler;
165 $mirrors_url_file="./mirrors";
167 function test_url($link, $proto)
168 {
169 global $output_url_file;
170 global $mirrors_url_file;
171 global $output_url_handler;
173 if ($output_url_file != "") {
174 switch($proto) {
175 case "http" :
176 case "ftp" :
177 $cmd = "busybox wget -s $link/README" ;
178 break;
179 case "rsync" :
180 $cmd = "rsync $link > /dev/null 2>&1" ;
181 break;
182 default :
183 return FALSE;
184 }
185 if (shell_exec("$cmd && echo -n OK") == "OK") {
186 fwrite($output_url_handler,$link."\n");
187 return TRUE;
188 }
189 return FALSE;
190 }
191 return shell_exec("grep -qs ^$link$ $mirrors_url_file && echo -n OK") == "OK";
192 }
194 if (! file_exists($mirrors_url_file)) {
195 $output_url_file = tempnam('/tmp','mkmirrors');
196 $output_url_handler = fopen($output_url_file, "w");
197 fwrite($output_url_handler,"http://mirror1.slitaz.org/\n");
198 fwrite($output_url_handler,"rsync://mirror1.slitaz.org/\n");
199 }
201 # Flags icons from http://www.famfamfam.com/lab/icons/flags/famfamfam_flag_icons.zip
202 foreach (array(
203 array( "flag" => "us",
204 "http" => "http://www.gtlib.gatech.edu/pub/slitaz/",
205 "ftp" => "ftp://ftp.gtlib.gatech.edu/pub/slitaz/",
206 "rsync" => "rsync://www.gtlib.gatech.edu/slitaz/"),
207 array( "flag" => "fr",
208 "http" => "http://download.tuxfamily.org/slitaz/",
209 "ftp" => "ftp://download.tuxfamily.org/slitaz/",
210 "rsync" => "rsync://download.tuxfamily.org/pub/slitaz/"),
211 array( "flag" => "fr",
212 "http" => "http://www.linuxembarque.com/slitaz/mirror/"),
213 array( "flag" => "cn",
214 "http" => "http://mirror.lupaworld.com/slitaz/"),
215 array( "flag" => "cn",
216 "http" => "http://ks.lupaworld.com/slitaz/"),
217 array( "flag" => "br",
218 "http" => "http://slitaz.c3sl.ufpr.br/",
219 "rsync" => "rsync://slitaz.c3sl.ufpr.br/slitaz/"),
220 array( "flag" => "si",
221 "http" => "http://mirror.drustvo-dns.si/slitaz/"),
222 array( "flag" => "si",
223 "ftp" => "ftp://ftp.pina.si/slitaz/"),
224 array( "flag" => "us",
225 "http" => "http://distro.ibiblio.org/pub/linux/distributions/slitaz/",
226 "ftp" => "ftp://distro.ibiblio.org/pub/linux/distributions/slitaz/"),
227 array( "flag" => "nl",
228 "http" => "http://ftp.vim.org/ftp/os/Linux/distr/slitaz/",
229 "ftp" => "ftp://ftp.vim.org/mirror/os/Linux/distr/slitaz/"),
230 array( "flag" => "de",
231 "http" => "http://ftp.uni-stuttgart.de/slitaz/",
232 "ftp" => "ftp://ftp.uni-stuttgart.de/slitaz/"),
233 array( "flag" => "au",
234 "http" => "http://mirror.iprimus.com/slitaz/"),
235 array( "flag" => "us",
236 "http" => "http://mirror.clarkson.edu/slitaz/",
237 "rsync" => "rsync://mirror.clarkson.edu/slitaz/")) as $mirror) {
238 $flag = "pics/website/".$mirror["flag"].".png";
239 $head = TRUE;
240 foreach(array("http", "ftp", "rsync") as $proto) {
241 if (!isset($mirror[$proto])) continue;
242 $link = $mirror[$proto];
243 if (!test_url($link, $proto)) continue;
244 $serveur = parse_url($link, PHP_URL_HOST);
245 if ($head) echo <<<EOT
246 <li><a href="http://en.utrace.de/?query=$serveur">
247 <img title="map" src="$flag" alt="map" /></a>
248 <a href="$link">$link</a>
249 EOT;
250 else echo <<<EOT
251 or <a href="$link">$proto</a>
252 EOT;
253 $head = FALSE;
254 }
255 if ($head) continue;
256 echo " </li>\n";
257 }
259 if ($output_url_file != "") {
260 fclose($output_url_handler);
261 rename($output_url_file, $mirrors_url_file);
262 chmod($mirrors_url_file, 0644);
263 }
265 ?>
266 </ul>
268 <!-- End of content -->
269 </div>
271 <!-- Footer -->
272 <div id="footer">
273 Copyright &copy; <span class="year"></span>
274 <a href="http://www.slitaz.org/">SliTaz</a> - Network:
275 <a href="http://scn.slitaz.org/">Community</a>
276 <a href="http://doc.slitaz.org/">Doc</a>
277 <a href="http://forum.slitaz.org/">Forum</a>
278 <a href="http://pkgs.slitaz.org/">Packages</a>
279 <a href="http://bugs.slitaz.org">Bugs</a>
280 <a href="http://hg.slitaz.org/">Hg</a>
281 <p>
282 SliTaz @
283 <a href="http://twitter.com/slitaz">Twitter</a>
284 <a href="http://www.facebook.com/slitaz">Facebook</a>
285 <a href="http://distrowatch.com/slitaz">Distrowatch</a>
286 <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a>
287 <a href="http://flattr.com/profile/slitaz">Flattr</a>
288 </p>
289 </div>
291 </body>
292 </html>