Gnu/Linux
#Gnu/Linux, Planet Libre, Android
FreeMobile: Les tests sont ils vraiment fiables ?
Un petit billet flash éclair pour montrer le peu de pertinence que peut nous apporter un test de débit sur les gros acteurs tels que dégroupTest and Co...

Materiel:
- Mobile Samsung Galaxy S2 sous Cyanogen Mod9 (ICS) en partage de connexion Wifi.
Test de débit avec l'application dégoup Test Sur Android
Test de débit DegroupTest Avec FreeMobile en 3G+ Réseau Orange (HSDPA).

Là on aurait envie de se dire, Génial !!!!
J'ai un super débit ca va flyer :)
Mais dans les fait quand on surf, c'est tout lent et tout pourri...
Je faits donc un test de transfert de fichier entre un serveur Web sur un de mes serveur Dédiés
Transfert de fichier HTTP à partir d'un serveur Web Dedibox.
J'ai utilisé mon serveur dédibox, afin d'heberger des fichiers web.


La résultat est sans Appel ....
Un magnifique transfert de fichier à 21,4Kbits/s !!!
Alors que selon dégroupTest on est censé monter à 6393Kbits/s ...
Pour conclure, j'ai bien l'impression que FreeMobiles ( mais a ne doit pas être le seul), optimise leur réseau pour ce genre de tests...
Autrement dit les tests sont pipés... mais ça on le savait déjà :)
#Gnu/Linux, Planet Libre, Android
Comparaison de quelques Explorateurs de fichiers sous Android
Une fois n'est pas coutume, j'ai décidé dans ce billet de comparer rapidement 4 explorateurs de fichiers disponibles sous Android.
J'en ai essayé pas mal, mais j'ai galéré pour trouver celui qui me va bien.
Si ce billet peut aider certain à choisir leur File Manager sous Android j'en serais heureux.
En regardant sur le Google Play, et en triant par popularité, 4 sortent du lot:







Fonctionnalités
![]() |
![]() |
![]() |
![]() |
|
Prix |
Gratuit |
Gratuit | Gratuit | Gratuit |
Popularité |
214500 |
323540 |
21380 |
40270 |
Je vais tester 2 choses:
- Les fonctionnalités
- Les débit réseaux (cifs)
Plateforme de test :
- Samsung Galaxy S2
- Cyanogen MOD9
- Android ICS
Mon NAS (assemblé à la main)
- CPU Intel Pentium G620 ( dual Core Sandy Bridge 2.6Ghz)
- Carte Mère : MSI H61I-E35 (Révision B3)
- RAM: Crucial Ballistix Sport DDR3 2 x 4 Go PC12800
- Alim: Be Quiet SFX Power - 300W
- Boitier: Fractal Design Core 1000
- HDD 2.5'' 80Go WD 5400tpm ( OS)
- HDD: 3.5'' 2 x 1 To Western Dgital RE2 SATA2 ( déjà en ma possession) DATA
- Le NAS est rélié en Gigabit sur mon réseau Local ( débit soutenu 800Mbits/s)
- Le mobile est relié en Wifi 802.11g (borne linksys WAP 54G)
- Débit Max constaté en WIFI 25Mbit/s
ES File Explorer

ES File Explorer est un des plus populaire
- L'interface



Remarques & Fonctionnalités:
- Interface Sobre et simpliste mais rapide
- Multiselections
- Recherches
- Gestion des applications (désinstallation)
- Intégration de partages LAN CIFS / FTP / BlueTooth...
- Integration de Dropbox, UbuntuOne, Skydrive ... Mais pas Google Drive !!!

Débit transfert CIFS 16Mbits/s
Astro File Manager

Astro est de loin le plus populaire des gestionnaire de fichier sur Android.
Je comprend aisément ce choix, car son interface est de loin la plus aboutie.
- L'interface






Comme je le disais plus haut l'interface est sans commune mesure avec ses concurents.
Les fonctionnalités sont nombreuses:
- Interface Sobre et intuitive
- Multiselections
- Recherches
- Gestion des applications (désinstallation)
- Recherche des partage réseaux en automatique
- Intégration de partages LAN CIFS / FTP / SFTP
- Integration de Dropbox, GoogleDrive, (Pas de Skydrive)
Malgré une interface superbe et intuitive j'ai trouvé quelques points négatifs
- Interface belle mais poussive, pas très rapide
- Pas de notification de transfert en arriere plan !!!
- Impossible d'ouvrir une Vidéo en réseau CIFS !!! il la télécharge
avant ...
Débits Transfert CIFS

Débit transfert CIFS 11 Mbits/s

Comme je le disais plus haut la fonctionnalité ouvrir avec est bien présente sur
un fichier en LAN CIFS, mais une fois cliqué sur Vidéo, Astro télécharge la vidéo...
Donc inutilisable pour lire des vidéos en direct.
Il existe une version payante à 3€99
OI File Manager

OI File manager est moins populaire que les autres, mais reste dans le top 4
- L'interface


Rien de transcandant dans l'interface de OI
Remarques & Fonctionnalités
- Interface sobre et efficace
- Recherche
- Paramètres peu nombreux
- Pas de multiselection
- Pas d'interface partage réseaux !!!!
File Manager (Rhythm Software)

FM est l'interface que j'utilisais depuis longtemps sur Android.
Je la trouvais simple, efficace et rapide.
- L'interface


Remarques & fonctionnalités:
- Interface Sobre et intuitive
- Multiselections
- Recherches
- Intégration de partages LAN CIFS
- Integration de Dropbox, GoogleDrive, Skydrive, Box...
Débits Transfert CIFS

Débit transfert CIFS 6Mbits/s
Impossible de monter au dessus des 6Mbits/s !!!
Conclusion
Maxi 5 étoiles
![]() |
![]() |
![]() |
![]() |
|
Interface |
**** |
*****
|
*** |
*** |
Fonctionnalités |
**** |
***** |
* |
*** |
Intégration Cloud |
**** |
**** |
***** |
|
Débit CIFS |
***** |
**** |
** |
|
Total /20 |
17 |
18 |
4 |
13 |
Pour conclure on vois que mis à part OI, les autres solutions sont très bonnes.
OI n'est pas mauvais, mais au niveau des 3 autres...
Astro
A voir les notes on aurait tendance à conseiller Astro qui à une interface superbe, énormément de fonctionnalités, une bonne intégration au cloud ( même si on aurait aimé skydrive, hubic, ubuntuone en plus)
En effet pour quelqun qui ne veut pas regarder de vidéos en réseau Astro est à mon avis le meilleur choix.
Mais pour moi le problème rédibitoire d'Astro, c'est qu'il à été incapable de lancer une vidéo directement !!!
quand on fait "ouvrir avec" il télécharge la vidéo en arrière plan... donc autrement dit vous n'êtes pas prêt de lire votre média...
Surtout si c'est de la HD à plusieurs GigaOctets...
FM Rhythm Soft
J'utilisais depuis très longtemps File Manager de Rhythm, il était rapide, bien intégré à Android, de bonne fonctionnalité Cloud et réseau.
Mais les tests de débits réseau sont catastrophiques !!!
Impossible de dépasser le 6Mbit/s en transfert et en lecture..
C'est long, très long !!!
Ceci en résulte de gros probleme pour lire les vidéos en direct, puisque le débit n'est pas suffisant pour emplir assez vite le buffer du player vidéo..
Donc cela donne des sacades et des freeze intempestifs de la vidéo.
ES
Pour mon utilisation, ES File Explorer est le plus utile.
Même si son interface ne vaut pas Astro, et qu'il à moins de fonctionnalités, il reste rapide et intuitif.
Et surtout c'est le grand gagnant du réseau.
J'ai vu monter les transfert CIFS en pointe a 20Mbits/s, la lecture en direct d'un flux vidéo ne pose pas de problème.
Les liens pour les installer à partir du Google Play
#Gnu/Linux, Planet Libre
Installation d'une solution de collaboration Ethercalc: Feuille de calcul collaborative
Je cherchais depuis un moment, un outil collaboratif.
Je cherche toujours des alternatives aux Géants du Web tels que Google ou Microsoft.
Mais force est de constater qu'il n'existe aujourd'hui pas de réèls concurents à ses solutions...
Le traitement de texte collaboratif que j'utilise est Etherpad, mais en ce qui concerne les feuille de calcul collaborative, c'est une autre paire de manche...
Ethercalc est un système de feuille collaborative open source, ce type d'outil est tellement rare, qu'il mérite un petit billet.

EtherCalc est un tableur collaboratif en temps réel. Il permet par défaut à un maximum de seize personnes de partager un texte en cours d'élaboration. Les contributions de chacun apparaissent immédiatement sur l'écran de tous les participants et sont signalées par des couleurs différentes. Une fenêtre de messagerie instantanée est également disponible.
Le système ne requiert aucune installation, ni aucune inscription, il suffit d'avoir une connexion internet et un navigateur web. EtherCalc est écrit en JavaScript.
L'application a été lancée le 19 novembre 2008 par David Greenspan, Aaron Iba et J.D. Zamfirescu (ces deux derniers travaillaient auparavant pour Google).
Le 4 décembre 2009, Google rachète AppJet, la société qui possède le logiciel et il est annoncé que cette application collaborative sera proposée sous licence Open Source1.
Le 17 décembre 2009, Google libère les sources d'EtherCalc sous licence Apache v2.
source: Wikipedia.
EtherCalc
- Language: LiveScript
- Runtime: Node.js (0.8+ preferred; compatible with 0.4)
- Services: Redis (2.4+; fall-back to on-disk JSON storage if not present)
- Browsers tested: Safari, Chrome, Firefox, IE.
- Integrated with content management systems:
- Overview:
- English: http://ethercalc.net/
- 中文版: http://ethercalc.tw/
Plateforme Materielle :
Comme d'habitude, j'ai monté mon prototype sur ma plateforme de virtualisation:
- HP® Proliant DL120
- CPU: 1x Intel® Xeon® E3-1220
- RAM: 16 Go DDR3 ECC
- HDD: 2 x 2 To SATA2 Raid 0 / Raid 1 HARD (P410)
- LAN: 1 Gbit/sec
Plateforme logicielle hyperviseur:
- Dom0 Ubuntu 12.04 X86_64 Xen 4.1
- DomU Xen Ubuntu 12.04 X86_64 Paravirtualisé
- 2 vcpus
- 512 Mo de Ram
- HDD 16GB
Installation:
Pour commencer j'ai mis à jour totalement mon DomU ubuntu 12.04; mon template avait quelques maj de retard :)
- Mise à niveau du DomU
root@ubuntults:/# apt-get update; apt-get upgrade
root@ubuntults:/# apt-get install linux-headers-server linux-image-server linux-server
root@ubuntults:/# reboot
- Installation des prérequis
root@antony-linux:/home/antony# apt-get install gzip git-core curl python perl build-essential
- Installation de node.js
Attention, ethercalc n'est pour l'instant pas compatible avec node.js v9
On utilise la version packagée dans ubuntu 12.04 : nodejs_0.6.12
root@antony-linux:/home/antony# apt-get install nodejs npm
- Installation de Ethercalc
root@ubuntu:~# cd /opt/
root@ubuntu:/opt# git clone https://github.com/audreyt/ethercalc.git
Cloning into 'ethercalc'...
remote: Counting objects: 2049, done.
remote: Compressing objects: 100% (1263/1263), done.
remote: Total 2049 (delta 755), reused 1905 (delta 626)
Receiving objects: 100% (2049/2049), 3.03 MiB | 1.73 MiB/s, done.
Resolving deltas: 100% (755/755), done.
On installe ethercalc:
root@ubuntults:/opt/ethercalc# root@ubuntu:/opt/ethercalc# npm i -g ethercalc
npm http GET https://registry.npmjs.org/ethercalc
npm http 200 https://registry.npmjs.org/ethercalc
npm http GET https://registry.npmjs.org/ethercalc/-/ethercalc-0.20121026.162049.tgz
npm http 200 https://registry.npmjs.org/ethercalc/-/ethercalc-0.20121026.162049.tgz
npm http GET https://registry.npmjs.org/redis
npm http GET https://registry.npmjs.org/uuid-pure
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/zappajs
npm http GET https://registry.npmjs.org/hiredis
npm http 200 https://registry.npmjs.org/uuid-pure
npm http GET https://registry.npmjs.org/uuid-pure/-/uuid-pure-1.0.10.tgz
npm http 200 https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/optimist/-/optimist-0.3.5.tgz
npm http 200 https://registry.npmjs.org/uuid-pure/-/uuid-pure-1.0.10.tgz
npm http 200 https://registry.npmjs.org/zappajs
npm http GET https://registry.npmjs.org/zappajs/-/zappajs-0.4.12.tgz
npm http 200 https://registry.npmjs.org/optimist/-/optimist-0.3.5.tgz
npm http 200 https://registry.npmjs.org/hiredis
npm http GET https://registry.npmjs.org/hiredis/-/hiredis-0.1.14.tgz
npm http 200 https://registry.npmjs.org/zappajs/-/zappajs-0.4.12.tgz
npm http 200 https://registry.npmjs.org/hiredis/-/hiredis-0.1.14.tgz
npm http 200 https://registry.npmjs.org/redis
npm http GET https://registry.npmjs.org/redis/-/redis-0.8.1.tgz
npm http 200 https://registry.npmjs.org/redis/-/redis-0.8.1.tgz
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/coffeecup/0.3.17
npm http GET https://registry.npmjs.org/coffee-css/0.0.5
npm http GET https://registry.npmjs.org/node-uuid/1.4.0
npm http GET https://registry.npmjs.org/uglify-js/1.3.4
npm http GET https://registry.npmjs.org/express/3.0.0
npm http GET https://registry.npmjs.org/socket.io/0.9.10
> hiredis@0.1.14 preinstall /usr/local/lib/node_modules/ethercalc/node_modules/hiredis
> make || gmake
cd deps/hiredis && make static
make[1]: Entering directory `/usr/local/lib/node_modules/ethercalc/node_modules/hiredis/deps/hiredis'
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
npm http 200 https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz
npm http 200 https://registry.npmjs.org/coffeecup/0.3.17
npm http GET https://registry.npmjs.org/coffeecup/-/coffeecup-0.3.17.tgz
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c
npm http 200 https://registry.npmjs.org/coffee-css/0.0.5
npm http GET https://registry.npmjs.org/coffee-css/-/coffee-css-0.0.5.tgz
npm http 200 https://registry.npmjs.org/uglify-js/1.3.4
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.3.4.tgz
npm http 200 https://registry.npmjs.org/socket.io/0.9.10
npm http 200 https://registry.npmjs.org/express/3.0.0
npm http GET https://registry.npmjs.org/socket.io/-/socket.io-0.9.10.tgz
npm http GET https://registry.npmjs.org/express/-/express-3.0.0.tgz
npm http 200 https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz
npm http 200 https://registry.npmjs.org/node-uuid/1.4.0
npm http GET https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.0.tgz
npm http 200 https://registry.npmjs.org/coffeecup/-/coffeecup-0.3.17.tgz
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c
npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.3.4.tgz
npm http 200 https://registry.npmjs.org/socket.io/-/socket.io-0.9.10.tgz
npm http 200 https://registry.npmjs.org/express/-/express-3.0.0.tgz
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
npm http 200 https://registry.npmjs.org/coffee-css/-/coffee-css-0.0.5.tgz
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
npm http 200 https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.0.tgz
make[1]: Leaving directory `/usr/local/lib/node_modules/ethercalc/node_modules/hiredis/deps/hiredis'
node-waf configure build
Setting srcdir to : /usr/local/lib/node_modules/ethercalc/node_modules/hiredis
Setting blddir to : /usr/local/lib/node_modules/ethercalc/node_modules/hiredis/build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr
'configure' finished successfully (0.075s)
Waf: Entering directory `/usr/local/lib/node_modules/ethercalc/node_modules/hiredis/build'
[1/3] cxx: hiredis.cc -> build/Release/hiredis_1.o
[2/3] cxx: reader.cc -> build/Release/reader_1.o
[3/3] cxx_link: build/Release/hiredis_1.o build/Release/reader_1.o -> build/Release/hiredis.node
Waf: Leaving directory `/usr/local/lib/node_modules/ethercalc/node_modules/hiredis/build'
'build' finished successfully (1.526s)
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/cookie/0.0.4
npm http GET https://registry.npmjs.org/crc/0.2.0
npm http GET https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/send/0.1.0
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/connect/2.6.0
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/redis/0.7.2
npm http GET https://registry.npmjs.org/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/optparse/1.0.3
npm http GET https://registry.npmjs.org/uglify-js/1.2.6
npm http GET https://registry.npmjs.org/stylus/0.27.2
npm http 200 https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.3.tgz
npm http 200 https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz
npm http 200 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script/-/coffee-script-1.4.0.tgz
npm http 200 https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/cookie/0.0.4
npm http GET https://registry.npmjs.org/cookie/-/cookie-0.0.4.tgz
npm http 200 https://registry.npmjs.org/crc/0.2.0
npm http GET https://registry.npmjs.org/crc/-/crc-0.2.0.tgz
npm http 200 https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz
npm http 200 https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/methods/-/methods-0.0.1.tgz
npm http 200 https://registry.npmjs.org/send/0.1.0
npm http GET https://registry.npmjs.org/send/-/send-0.1.0.tgz
npm http 200 https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 200 https://registry.npmjs.org/connect/2.6.0
npm http GET https://registry.npmjs.org/connect/-/connect-2.6.0.tgz
npm http 200 https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/debug/-/debug-0.7.0.tgz
npm http 200 https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/underscore/-/underscore-1.4.2.tgz
npm http 200 https://registry.npmjs.org/optparse/1.0.3
npm http GET https://registry.npmjs.org/optparse/-/optparse-1.0.3.tgz
npm http 200 https://registry.npmjs.org/redis/0.7.2
npm http GET https://registry.npmjs.org/redis/-/redis-0.7.2.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.10.tgz
npm http 200 https://registry.npmjs.org/uglify-js/1.2.6
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.6.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.3.tgz
npm http 200 https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz
npm http 200 https://registry.npmjs.org/coffee-script/-/coffee-script-1.4.0.tgz
npm http 200 https://registry.npmjs.org/stylus/0.27.2
npm http GET https://registry.npmjs.org/stylus/-/stylus-0.27.2.tgz
npm http 200 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/cookie/-/cookie-0.0.4.tgz
npm http 200 https://registry.npmjs.org/crc/-/crc-0.2.0.tgz
npm http 200 https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz
npm http 200 https://registry.npmjs.org/methods/-/methods-0.0.1.tgz
npm http 200 https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 200 https://registry.npmjs.org/send/-/send-0.1.0.tgz
npm http 200 https://registry.npmjs.org/connect/-/connect-2.6.0.tgz
npm http 200 https://registry.npmjs.org/debug/-/debug-0.7.0.tgz
npm http 200 https://registry.npmjs.org/underscore/-/underscore-1.4.2.tgz
npm http 200 https://registry.npmjs.org/optparse/-/optparse-1.0.3.tgz
npm http 200 https://registry.npmjs.org/redis/-/redis-0.7.2.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.10.tgz
npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.6.tgz
npm http 200 https://registry.npmjs.org/stylus/-/stylus-0.27.2.tgz
npm http 200 https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz
npm http GET https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/send/0.0.4
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http 200 https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/qs/-/qs-0.5.1.tgz
npm http 200 https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz
npm http 200 https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/mime/-/mime-1.2.6.tgz
npm http 200 https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/pause/-/pause-0.0.1.tgz
npm http 200 https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/bytes/-/bytes-0.1.0.tgz
npm http 200 https://registry.npmjs.org/send/0.0.4
npm http GET https://registry.npmjs.org/send/-/send-0.0.4.tgz
npm http 200 https://registry.npmjs.org/qs/-/qs-0.5.1.tgz
npm http 200 https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz
npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.6.tgz
npm http 200 https://registry.npmjs.org/pause/-/pause-0.0.1.tgz
npm http 200 https://registry.npmjs.org/bytes/-/bytes-0.1.0.tgz
npm http 200 https://registry.npmjs.org/send/-/send-0.0.4.tgz
npm http GET https://registry.npmjs.org/mime/1.2.6
npm http 304 https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/mkdirp
npm http 200 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.4.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.4.tgz
npm http 304 https://registry.npmjs.org/debug
npm http 200 https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/cssom/-/cssom-0.2.5.tgz
npm http 200 https://registry.npmjs.org/cssom/-/cssom-0.2.5.tgz
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 200 https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http 200 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http 200 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/ws/-/ws-0.4.22.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http 200 https://registry.npmjs.org/ws/-/ws-0.4.22.tgz
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http 200 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http 200 https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/options/-/options-0.0.3.tgz
npm http 200 https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http 200 https://registry.npmjs.org/options/-/options-0.0.3.tgz
npm http 200 https://registry.npmjs.org/commander
> ws@0.4.22 install /usr/local/lib/node_modules/ethercalc/node_modules/zappajs/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> node install.js
[ws v0.4.22] Attempting to compile blazing fast native extensions.
[ws v0.4.22] Native code compile failed (but the module will still work):
[ws v0.4.22] The native extensions are faster, but not required.
[ws v0.4.22] On Windows, native extensions require Visual Studio and Python.
[ws v0.4.22] On Unix, native extensions require Python, make and a C++ compiler.
[ws v0.4.22] Start npm with --ws:verbose to show compilation output (if any).
/usr/local/bin/ethercalc -> /usr/local/lib/node_modules/ethercalc/bin/ethercalc
ethercalc@0.20121026.162049 /usr/local/lib/node_modules/ethercalc
├── uuid-pure@1.0.10
├── redis@0.8.1
├── optimist@0.3.5 (wordwrap@0.0.2)
├── hiredis@0.1.14
└── zappajs@0.4.12
C'est bien joli, mais déjà on le lance en root ce qui n'est pas jojo et on est obligé de lancer le script à la main...
C'est pas très optimisé...
On crée un user Ethercalc et on donne les droits adéquats.
root@ubuntults:~# useradd ethercalcOn crée maintenant un script d'init afin de pouvoir lancer Ethercalc en tant que daemon
root@ubuntults:~# chown -R ethercalc /opt/ethercalc
Ce script nous permet de lancer ethercalc en tant que ethercalc et aussi de pouvoir la lancer au demmarage.
#!/bin/sh
### BEGIN INIT INFO
# Provides: ethercalc
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts ethercalc
# Description: starts ethercalc lite using start-stop-daemon
### END INIT INFO
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin"
LOGFILE="/var/log/ethercalc.log"
EPLITE_DIR="/usr/local/bin/"
EPLITE_BIN="ethercalc"
USER="ethercalc"
GROUP="ethercalc"
DESC="Ethercalc"
NAME="ethercalc"
set -e
. /lib/lsb/init-functions
start() {
echo "Starting $DESC... "
start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
echo "done"
}
#We need this function to ensure the whole process tree will be killed
killtree() {
local _pid=$1
local _sig=${2-TERM}
for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
killtree ${_child} ${_sig}
done
kill -${_sig} ${_pid}
}
stop() {
echo "Stopping $DESC... "
while test -d /proc/$(cat /var/run/$NAME.pid); do
killtree $(cat /var/run/$NAME.pid) 15
sleep 0.5
done
rm /var/run/$NAME.pid
echo "done"
}
status() {
status_of_proc -p /var/run/$NAME.pid "" "ethercalc" && exit 0 || exit $?
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo "Usage: $NAME {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0
On le rend executable.
root@ubuntults:/var/log# chmod +x /etc/init.d/ethercalc
On active le script au démmarage:
root@ubuntu:/opt/ethercalc# update-rc.d ethercalc defaults
Adding system startup for /etc/init.d/ethercalc ...
/etc/rc0.d/K20ethercalc -> ../init.d/ethercalc
/etc/rc1.d/K20ethercalc -> ../init.d/ethercalc
/etc/rc6.d/K20ethercalc -> ../init.d/ethercalc
/etc/rc2.d/S20ethercalc -> ../init.d/ethercalc
/etc/rc3.d/S20ethercalc -> ../init.d/ethercalc
/etc/rc4.d/S20ethercalc -> ../init.d/ethercalc
/etc/rc5.d/S20ethercalc -> ../init.d/ethercalc
root@ubuntults:/var/log# /etc/init.d/ethercalc start
Notre ethercalc est bien lancé
root@ubuntu:/opt/ethercalc# ps aux | grep ethercalc
1001 12154 1.7 7.1 724976 35712 ? Sl 22:09 0:00 node /usr/local/bin//ethercalc /var/log/ethercalc.log
root 12190 0.0 0.1 8104 924 pts/0 S+ 22:10 0:00 grep --color=auto ethercalc
L'interface:


- La fonction Graphs

Ethercalc est un outil simple installer, léger, et agréable à utiliser.
Bien sur il est bien loin des fonctionnalités de Google Docs ou autres, mais il a le mérite d'exister.
Pour un usage ponctuel il est très souvent suffisant.
Surtout le plus important c'est qu'il est installé sur vos serveurs.
Ethercalc est un moteur, après il faut faire toute l'intégration CMS autour.
Quelques projets existent déjà:
#Gnu/Linux, Planet Libre
Bridage de débit, Free non dégroupé et Youtube : La preuve !!!

Depuis un bon moment je peste pour lire des vidéos sur Youtube à partir de ma connexion ND Free...
C'est encore plus le cas depuis que mon fils s'interesse au dessin animés :)
En effet, avoir le logo d'attente toute les 10 secondes quand on regarde une vidéo devient vite insupportable.
Quand je parlais de ce problème, les petits malins n'avaient rien d'autre à dire, que "Oui c'est ta connexion qui est pourrie" " Tu as un débit de m...." etc...
J'ai voulut en avoir le coeur net et donner la preuve que le bridage est bien au niveau du peering Free ADSL et Youtube...
Plateforme Materielle :
- CPU: Core I5 2500K
- RAM: 8 Go DDR3 ECC
- HDD: 1 x 64Go SSD Crucial C300
- LAN: 1 Gbit/sec
- OS: Ubuntu Desktop 12.04 64bits
Bande passante Maximum en download : 5.50Mb/s (670KiB/s)
Protocole:
Mon protocole est très simple.
- Streaming d'une vidéo hebergée sur ma Dedibox propulsée par phpmotion sur Totem par ma connexion Free ADSL + Mesure du débit instantanée.
- Streaming d'une vidéo Youtube sur Totem par ma connexion Free ADSL + Mesure du débit instantanée.
- Streaming d'une vidéo Youtube sur Totem en passant par un VPN Giganews + Mesure du débit instantanée.
Streaming d'une vidéo hebergée sur ma Dedibox
Là on ne parle pas du tout, de youtube, je vais juste un test de streaming entre mon PC et mon serveur dedibox.
Il s'agit d'une vidéo flv personnelle de vacances propulsée par mon serveur phpmotion.

Débit download = 5.54Mb/s
Le résultat est sans appel, ma connexion est saturée !!!
Streaming d'une vidéo Youtube sur Totem par ma connexion Free ADSL
Là c'est du sérieux.
J'ai choisi une vidéo youtube assez longue:

Débit download = 1.12Mb/s
Le résultat est sans appel, je plafonne à 1Mb/s sur un streaming Youtube...
A partir de là on voit que le bridage vers Youtube est bien présent !!
Certains vont dire que Free ND passant par les infrastructures Orange, c'est orange qui bride le débit...
Mais dans ce cas je serais bridé partout...
Streaming d'une vidéo Youtube sur Totem en passant par un VPN Giganews
Pour finir le test ultime, streaming d'une video Youtube en passant par un VPN externe.
Pour mon test j'ai utilisé le VPN PPTP inclus dans mon abonnement Giganews. ( en passant par les serveurs FR)

Débit download = 5.51Mb/s
Le résultat est sans appel, ma connexion est saturée !!!
En passant pas un VPN le bridage n'est plus là...
#Gnu/Linux, Planet Libre
Script: Lister les DomU Xen et leurs ressources

Ceux qui suivent un petit peu mon blog savent que j'utilise principalement Xen comme système de vitualisation.
La plupart du temps sous Open Suse, SLES, et maintenant Ubuntu 12.04
Et LVM2 pour la gestion des disques.
J'aime gérer ce système avec des scripts maison.
Ce qui me faisait le plus défaut c'est avoir rapidement les infos sur les domU installés.
Les infos à lister:
- Nom du DomU.
- Son status On ou OFF
- Son ID
- Son Uptime
- Son temps CPU
- Son poids
- Son Cap
- Son State
- Sa Memory
- Ses Disques et leurs tailles
- Le port VNC attribué à la VM
- Qui est connecté sur le VNC
Autant dire que ca fait beaucoup de choses....
J'ai commencé à gratter un petit script bash, bien pratique qui demande à être amélioré.
Ce script fonctionne si les DomU utilise des disques lvm
Le script:
ramfs.sh (pour travailler en ram sur les petit fichiers temporaires)
#!/bin/bash
#Antony MARTINEAU 2009.
#Mounting a temporary file system
#/sbin/ramfs.sh
ramfs="/tmpramfs"
if [ ! -d $ramfs ]; then
mkdir $ramfs
fi
if [ -z $(mount|grep "$ramfs"|sed -n "1{p;q;}"|awk '{print $1}') ]; then
mount -t tmpfs -o size=4M, tmpfs $ramfs > /dev/null 2>&1
fi
Domlist
#!/bin/bash
#DOMLIST V1.0
#Antony MARTINEAU
#Xen Virtual Machine Information by Antony MARTINEAU.
####################
ramfs.sh
###################
ramfs="/tmpramfs"
#Fonction pour afficher les echo en couleur
#31=rouge, 32=vert, 33=jaune,34=bleu, 35=rose, 36=cyan, 37= blanc
color()
{
printf '\033[%sm%s\033[m\n' "$@"
}
###############################
xmlistfic=$(ls $ramfs|grep xmlistfic.); for i in $xmlistfic; do pidlock=$(echo $i|cut -d"." -f2); if [ -z $(pidstat -p $pidlock|gawk '{print $2}'|grep $pidlock) ]; then rm -f $ramfs/$i; fi; done
schedlist=$(ls $ramfs|grep schedlist.); for i in $schedlist; do pidlock=$(echo $i|cut -d"." -f2); if [ -z $(pidstat -p $pidlock|gawk '{print $2}'|grep $pidlock) ]; then rm -f $ramfs/$i; fi; done
xmuptimefic=$(ls $ramfs|grep xmuptimefic.); for i in $xmuptimefic; do pidlock=$(echo $i|cut -d"." -f2); if [ -z $(pidstat -p $pidlock|gawk '{print $2}'|grep $pidlock) ]; then rm -f $ramfs/$i; fi; done
lvdispl=$(ls $ramfs|grep lvdispl.); for i in $lvdispl; do pidlock=$(echo $i|cut -d"." -f2); if [ -z $(pidstat -p $pidlock|gawk '{print $2}'|grep $pidlock) ]; then rm -f $ramfs/$i; fi; done
psaux=$(ls $ramfs|grep psaux.); for i in $psaux; do pidlock=$(echo $i|cut -d"." -f2); if [ -z $(pidstat -p $pidlock|gawk '{print $2}'|grep $pidlock) ]; then rm -f $ramfs/$i; fi; done
lsof=$(ls $ramfs|grep lsof.); for i in $lsof; do pidlock=$(echo $i|cut -d"." -f2); if [ -z $(pidstat -p $pidlock|gawk '{print $2}'|grep $pidlock) ]; then rm -f $ramfs/$i; fi; done
##############################
pid=$$
xmlist="$ramfs/xmlistfic.$pid"
xmsched="$ramfs/schedlist.$pid"
xmlv="$ramfs/lvdispl.$pid"
psaux="$ramfs/psaux.$pid"
dompath="/etc/xen/vm"
xmuptime="$ramfs/xmuptimefic.$pid"
lsof="$ramfs/lsof.$pid"
hostname=$(uname -n)
param=$(echo $*)
arg=$(echo $param| sed 's/[ \t]*$//')
################################HELP##################################
if [ "$param" = "--help" ]; then
echo "domlist v1.0 by Antony MARTINEAU"
echo "Xen virtual machine informations"
echo "Usage: domlist DomU_name (ex: domlist lippi-web)"
echo "Without argument, --all Domu will be show"
echo "domlist --all show all domU on all cluster node"
echo "option -g (gui) show list whithout column and backspace, separated by ;"
exit 0
fi
#####################################################################
for i in $*; do
if [ $i = "-g" ]; then
flaggui="true"
arg=$(echo $param|sed -r 's/(^| )-g( |$)/\1/g' | sed 's/[ \t]*$//')
flag="-g"
elif [ $i = "--all" ]; then
flagall="true"
elif [ $i = "all" ]; then
flagall="true"
fi
done
######################################################################
if [[ $arg = "all" ]]; then
arg="--all"
fi
if [[ -z $arg ]] || [[ "$arg" = "--all" ]]; then
vmlist=$(grep -w "name=" $dompath/* |cut -d'"' -f2)
vmline=$( echo $vmlist | wc -l)
caracini="0"
carac="0"
caracdiskini="0"
caracdisk="0"
for k in $vmlist
do
caracini=$(echo $k | wc -c )
caracdiskini=$(grep -o phy $dompath/$k | wc -l)
if [ "$caracdiskini" -gt "$caracdisk" ]; then
caracdisk=$(grep -o phy $dompath/$k | wc -l)
if [ "$caracdisk" = "1" ]; then
caracdisk=$(grep -o phy $dompath/$k | wc -l)
caracdisktitl="23"
caradiskclist="20"
list="1"
fi
if [ "$caracdisk" = "2" ]; then
caracdisk=$(grep -o phy $dompath/$k | wc -l)
caracdisktitl="56"
caradiskclist="103"
list="2"
fi
if [ "$caracdisk" = "3" ]; then
caracdisk=$(grep -o phy $dompath/$k | wc -l)
caracdisktitl="67"
caradiskclist="67"
list="3"
fi
if [ "$caracdisk" = "4" ]; then
caracdisk=$(grep -o phy $dompath/$k | wc -l)
caracdisktitl="88"
caradiskclist="88"
list="4"
fi
fi
if [ "$caracini" -gt "$carac" ]; then
carac=$(echo $k | wc -c )
caractitl=$(($carac+4))
caraclist=$(($carac-1))
fi
done
else
carac=$(echo $arg | wc -c)
caractitl=$(($carac+4))
caraclist=$(($carac-1))
fi
######################################################################
tab1()
{
echo `color 31 "On $hostname"`
echo -e `color 32 "Name Status ID Uptime Vcpus Time Weight Cap State Memory Disks-Resources VNC-Port"` |gawk -F" " ' { printf("%-'$caractitl's %-6s %-5s %-10s %-3s %-6s %-2s %-3s %-6s %-6s %-73s %-8s %s\n", $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) }'
}
tab2()
{
echo `color 31 "On $hostname"`
echo -e `color 32 "Name Status ID Uptime Vcpus Time Weight Cap State Memory Disks-Resources VNC-Port" | sed 's/ /;/g'`
}
xm list > $xmlist
xm sched-credit > $xmsched
xm uptime > $xmuptime
lvdisplay 2>/dev/null > $xmlv
ps aux > $psaux
lsof -Pn > $lsof
if [[ $flaggui = "true" ]]; then
tab2
else
tab1
fi
lines=$(grep -w "name" $dompath/* | wc -l)
if [ -z $lines ]; then
lines=1
fi
if [[ $flagall = "true" ]]; then
dom=$(echo $vmlist)
else
dom=$(echo $arg)
fi
if [[ $flaggui = "true" ]]; then
if [ -z $arg ]; then
dom=$(echo $vmlist)
fi
fi
if [ -z $1 ]; then
dom=$(echo $vmlist)
fi
for i in $dom; do
vmname[$i]=$(echo $i)
#vmname[$i]=$(grep -w "name=" $dompath/* |cut -d'"' -f2 |sed -n "$i{p;q;}")
vname=${vmname[$i]}
numofdisk=$(grep -o phy $dompath/$vname | wc -l)
migrating=$(grep -w $vname $xmlist | grep "migrating" | awk '{print $1}')
if [ ! -z $migrating ]; then
migrating="-Migrating-"
else
migrating=$empty
fi
pidvm=$(cat $psaux | grep -w qemu-dm |grep -w $vname | awk '{print $2}')
vmid=$(cat $xmlist | grep -w $vname | awk '{print $2}' | cut -d":" -f2)
vmcpu=$(cat $dompath/$vname | grep vcpus | cut -d"=" -f2)
vmstate=$(cat $xmlist | grep -w $vname | awk '{print $5}' | cut -d":" -f2)
vmtime=$empty
lvname=$(echo $res | sed 's/r/vm/')
vmexist=$(cat $xmlist | grep -w $vname | awk '{print $1}')
uptime=$empty
vmweigt=$empty
res1=$empty
res2=$empty
res3=$empty
res4=$empty
resd1=$empty
resd2=$empty
resd3=$empty
resd4=$empty
vncwho=$empty
vncport=$empty
vglvdisp1=$empty
vglvdisp2=$empty
vglvdisp3=$empty
vglvdisp4=$empty
for j in `seq 2 5`
do
disk="hda hdb hdc hdd"
res[$j]=$(awk -F"phy:/dev/" '{print $'$j'}' $dompath/$vname|sed '/./!d'|cut -d"," -f2,1)
hdlist[$j]=$(echo ${res[$j]} | cut -d"," -f2)
r[$j]=$(echo ${res[$j]} | cut -d"," -f1 | sed 's/drbd/r/')
for k in $disk
do
if [ "$k" = "${hdlist[$j]}" ]; then
if [ "$k" = "hda" ]; then
res1="${r[$j]}"
resd1="${r[$j]}(hda)"
fi
if [ "$k" = "hdb" ]; then
res2="${r[$j]}"
resd2="${r[$j]}(hdb)"
fi
if [ "$k" = "hdc" ]; then
res3="${r[$j]}"
resd3="${r[$j]}(hdc)"
fi
if [ "$k" = "hdd" ]; then
res4="${r[$j]}"
resd4="${r[$j]}(hdd)"
fi
fi
done
done
if [ ! -z $vmid ]; then
vmweight=$(cat $xmsched | grep -w $vname | awk '{print $3}' | cut -d":" -f2)
else
vmweight=$(cat $dompath/$vname | grep "cpu_weight" | cut -d"=" -f2)
fi
vmcap=$empty
if [ ! -z $vmid ]; then
vmcap=$(cat $xmsched | grep -w $vname | awk '{print $4}' | cut -d":" -f2)
else
vmcap=$(cat $dompath/$vname | grep cpu_cap | cut -d"=" -f2)
fi
second=$(cat $xmlist | grep -w $vname | awk '{print $6}' | cut -d":" -f2 | cut -d"." -f-1)
if [ -z $second ]; then #second est nulle
vmtime=""
else
if [ "$second" -lt 3600 ]; then
second=$(cat $xmlist | grep -w $vname | awk '{print $6}' | cut -d":" -f2 | cut -d"." -f-1)
vmtime=$(echo $second's')
else
min=$(($second/60))
if [ "$min" -lt 1440 ]; then
vmtime=$(echo $min'm')
else
hour=$(($min/60))
vmtime=$(echo $hour'h')
fi
fi
fi
day=$(cat $xmuptime | grep -w $vname | cut -d"," -f1|awk '{print $4}'| sed '/^$/d')
if [ ! -z $day ]; then #day est non nul
day=$(cat $xmuptime | grep -w $vname | awk '{print $3}')
hours=$(cat $xmuptime | grep -w $vname | cut -d":" -f1 | cut -d"," -f2 | sed 's/ //g')
if [ "$hours" -lt 10 ]; then
hours=$(cat $xmuptime | grep -w $vname | cut -d":" -f1 | cut -d"," -f2 | sed 's/ //g'| sed 's/^/0/g')
uptime=$(cat $xmuptime | grep -w $vname | awk '{print $3,$4,$5}'|cut -d":" -f2-3 | cut -d":" -f1)
uptime=$(echo $hours:$uptime |sed 's/^/'$day'd,/g'| sed 's/:/h:/2' | sed 's/$//')
else
uptime=$(cat $xmuptime | grep -w $vname | awk '{print $3,$4,$5}'|cut -d":" -f2-3 | cut -d":" -f1)
uptime=$(echo $hours:$uptime |sed 's/^/'$day'd,/g'| sed 's/:/h:/2' | sed 's/$//' )
fi
else #day est nul
hours=$(cat $xmuptime | grep -w $vname | cut -d"," -f1 | awk '{print $3}' | cut -d":" -f1)
if [ -z $hours ]; then
uptime=$(cat $xmuptime | grep -w $vname | awk '{print $3,$4,$5}'| sed 's/^/'$day'd,/g' | cut -d":" -f1 | sed 's/:/h:/2' | sed 's/$/m/' )
else
if [ "$hours" -lt 10 ]; then
uptime=$(cat $xmuptime | grep -w $vname | cut -d"," -f1 | awk '{print $3}' | cut -d":" -f-2 | sed 's/^/0/' | sed 's/^//' )
else
uptime=$(cat $xmuptime | grep -w $vname | awk '{print $3,$4,$5}'| sed 's/$//'| cut -d":" -f-2 |sed 's/^//')
fi
fi
fi
vmmem=$empty
if [ ! -z $vmid ]; then
if [ "$1" = "-g" ]; then
vmmem=$(cat $xmlist | grep -w $vname | awk '{print $3}' | cut -d":" -f2)
else
vmmem=$( cat $xmlist | grep -w $vname | awk '{print $3}' | cut -d":" -f2 |sed 's/$/MB/')
fi
else
if [ "$1" = "-g" ]; then
vmmem=$(cat /etc/xen/vm/$vname | grep memory | cut -d"=" -f2)
else
vmmem=$(cat $dompath/$vname | grep memory | cut -d"=" -f2 |sed 's/$/MB/')
fi
fi
sizer1=$empty
if [ ! -z $res1 ]; then
lv1=$(echo $res1 | sed 's/r/lv/')
if [ ! -z $lv1 ]; then
sizer1=$(cat $xmlv | grep -A8 -w $lv1 | grep "LV Size" | awk '{print $3,$4}' | sed 's/ //' | sed 's/\.00//'| sed -n '1p')
fi
fi
sizer2=$empty
if [ ! -z $res2 ]; then
lv2=$(echo $res2 | sed 's/r/lv/')
if [ ! -z $lv2 ]; then
sizer2=$(cat $xmlv | grep -A8 -w $lv2 | grep "LV Size" | awk '{print $3,$4}' | sed 's/ //' | sed 's/\.00//'| sed -n '1p')
fi
fi
sizer3=$empty
if [ ! -z $res3 ]; then
lv3=$(echo $res3 | sed 's/r/lv/')
if [ ! -z $lv3 ]; then
sizer3=$(cat $xmlv | grep -A8 -w $lv3 | grep "LV Size" | awk '{print $3,$4}' | sed 's/ //' | sed 's/\.00//'| sed -n '1p')
fi
fi
sizer4=$empty
if [ ! -z $res4 ]; then
lv4=$(echo $res4 | sed 's/r/lv/')
if [ ! -z $lv4 ]; then
sizer1=$(cat $xmlv | grep -A8 -w $lv4 | grep "LV Size" | awk '{print $3,$4}' | sed 's/ //' | sed 's/\.00//'| sed -n '1p')
fi
fi
if [ -z $pidvm ]; then
vncport="No vnc"
else
vncport=$( cat $lsof | grep $pidvm | grep "TCP *" | grep "LISTEN"| awk -F":*" '{print $2}' | awk '{print $1}'| sed -n '1p')
vncwho=$( cat $lsof | grep $pidvm | grep "TCP *" | awk -F"TCP" '{print $2}' | grep -v teradataordbms | grep "ESTABLISHED" | cut -d":" -f2 | sed 's/^....//')
fi
disk1=$(echo $vglvdisp1$resd1$sizer1)
disk2=$(echo $vglvdisp2$resd2$sizer2)
disk3=$(echo $vglvdisp3$resd3$sizer3)
disk4=$(echo $vglvdisp4$resd4$sizer4)
if [ -z $vmexist ]; then
vmrun="off"
else
vmrun="on"
fi
echo -e "$vname|$vmrun|$vmid|$uptime|$vmcpu|$vmtime|$vmweight|$vmcap|$vmstate|$vmmem|$disk1|$disk2|$disk3|$disk4|$vncport|$vncwho|$migrating"
done |
if [[ $flaggui = "true" ]]; then
sed 's/|/;/g'
else
gawk -F"|" '{ printf("%-'$caraclist's %-6s %-5s %-10s %-5s %-6s %-6s %-3s %-6s %-6s %-22s %-24s %-18s %-6s %-2s %-s\n", $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) }'
fi
if [ "$arg" = "--all" ]; then
arg=$empty
var="1"
fi
if [ "$var" = "1" ]; then ssh=0; else ssh=1; fi
rm -f $xmlist
rm -f $xmsched
rm -f $xmuptime
rm -f $xmlv
rm -f $psaux
rm -f $lsof
Voilà ce que ca donné au final:

Je ne suis pas mécontent.