Strip leading/trailing whitespaces from all files

This commit is contained in:
asergi 2012-06-19 13:00:00 +02:00
parent 0c8c91297e
commit 5bdb9af329
11 changed files with 118 additions and 118 deletions

View File

@ -1,4 +1,4 @@
GNU LESSER GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
@ -10,7 +10,7 @@
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
@ -111,7 +111,7 @@ the following:
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the

6
NEWS
View File

@ -28,7 +28,7 @@ Version 1.3.6
* Change static Python path (issue #20)
* Correct a bug with a network interface disaippear (issue #27)
* Add French and Spanish translation (thx to Jean Bob)
Version 1.3.5
=============
@ -39,8 +39,8 @@ Version 1.3.4
=============
* New key: 'n' to enable/disable network stats
* New key: 'd' to enable/disable disk IO stats
* New key: 'f' to enable/disable FS stats
* New key: 'd' to enable/disable disk IO stats
* New key: 'f' to enable/disable FS stats
* Reorganised the screen when stat are not available|disable
* Force Glances to use the enmbeded fs stats (issue #16)

26
README
View File

@ -102,14 +102,14 @@ When Glances is running, you can press:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/header.png)
The header shows the Glances version, the host name and the operating
The header shows the Glances version, the host name and the operating
system name, version and architecture.
### CPU
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/cpu.png)
The CPU states are shown as a percentage and for the configured refresh
The CPU states are shown as a percentage and for the configured refresh
time.
If user|kernel|nice CPU is < 50%, then status is set to "OK".
@ -124,12 +124,12 @@ If user|kernel|nice CPU is > 90%, then status is set to "CRITICAL".
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/load.png)
On the Nosheep blog, Zach defines the average load: "In short it is the
average sum of the number of processes waiting in the run-queue plus the
On the Nosheep blog, Zach defines the average load: "In short it is the
average sum of the number of processes waiting in the run-queue plus the
number currently executing over 1, 5, and 15 minute time periods."
Glances gets the number of CPU cores to adapt the alerts. With Glances,
alerts on average load are only set on 5 and 15 mins.
Glances gets the number of CPU cores to adapt the alerts. With Glances,
alerts on average load are only set on 5 and 15 mins.
If average load is < O.7*Core, then status is set to "OK".
@ -163,7 +163,7 @@ If memory is > 90%, then status is set to "CRITICAL".
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/network.png)
Glances display the network interface bit rate. The unit is adapted
Glances display the network interface bit rate. The unit is adapted
dynamicaly (bits per second, Kbits per second, Mbits per second...).
Alerts are set only if the network interface maximum speed is available.
@ -176,14 +176,14 @@ If bitrate is > 70%, then status is set to "WARNING".
If bitrate is > 90%, then status is set to "CRITICAL".
For exemple, on a 100 Mbps Ethernet interface, the warning status is set
For exemple, on a 100 Mbps Ethernet interface, the warning status is set
if the bit rate is higher than 70 Mbps.
### Disk I/O
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/diskio.png)
Glances display the disk I/O throughput. The unit is adapted dynamicaly
Glances display the disk I/O throughput. The unit is adapted dynamicaly
(bytes per second, Kbytes per second, Mbytes per second...).
There is no alert on this information.
@ -192,8 +192,8 @@ There is no alert on this information.
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/fs.png)
Glances display the total and used filesytem disk space. The unit is
adapted dynamicaly (bytes per second, Kbytes per second, Mbytes per
Glances display the total and used filesytem disk space. The unit is
adapted dynamicaly (bytes per second, Kbytes per second, Mbytes per
second...).
Alerts are set for used disk space:
@ -212,7 +212,7 @@ If disk used is > 90%, then status is set to "CRITICAL".
Glances displays a summary and a list of processes.
By default (or if you hit the 'a' key) the process list is automaticaly
By default (or if you hit the 'a' key) the process list is automaticaly
sorted by CPU of memory consumption.
The number of processes in the list is adapted to the screen size.
@ -231,7 +231,7 @@ There is one line per alert with the following information:
* start date
* end date
* alert name
* (min/avg/max) values
* (min/avg/max) values
### Footer

View File

@ -3,10 +3,10 @@ Glances -- Votre système en un coups d'oeil
## Description
Glances est un logiciel libre (licence LGPL) permettant de surveiller votre
Glances est un logiciel libre (licence LGPL) permettant de surveiller votre
système d'exploitation GNU/Linux ou BSD à partir d'une interface texte.
Glances utilise la librairie libstatgrab pour récupérer les informations de
Glances utilise la librairie libstatgrab pour récupérer les informations de
votre système. Il est développé en Python.
![screenshot](https://github.com/nicolargo/glances/raw/master/screenshot.png)
@ -17,7 +17,7 @@ votre système. Il est développé en Python.
Des paquets existent pour plusieurs distributions: Arch, Fedora/Redhat...
Le processus de packaging est actuellement en cours sur d'autres distribs, je
vous conseille donc de rechercher Glances sur votre gestionnaire de package
vous conseille donc de rechercher Glances sur votre gestionnaire de package
avant de faire une installation depuis les sources.
### Depuis le PPA (pour les systèmes Ubuntu/Mint...)
@ -50,7 +50,7 @@ Puis on installe la dernière version de Glances:
Le projet Glances est hébergé sur GitHUB: https://github.com/nicolargo/glances
Pour l'installer, il suffit de suivre les instructions suivantes depuis un
Pour l'installer, il suffit de suivre les instructions suivantes depuis un
terminal.
Récupération de la dernière version (1.4):
@ -74,7 +74,7 @@ Il suffit de saisir la commande suivante dans une console ou un terminal:
$ glances.py
Note: sur certaines distributions, il faut saisir glances en lieu et place
Note: sur certaines distributions, il faut saisir glances en lieu et place
de glances.py.
## Guide d'utilisation
@ -114,7 +114,7 @@ Passons ensuite à la description de la fenêtre de Glances:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/header.png)
L'en-tête montre la version de Glances, le nom de la machine (FQND) ainsi
L'en-tête montre la version de Glances, le nom de la machine (FQND) ainsi
qu'une information sur le système d'exploitation (nom, version).
### CPU
@ -135,14 +135,14 @@ Si user|kernel|nice CPU est > 90%, alors le status est "CRITICAL".
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/load.png)
Il est assez difficile de donner une définition claire de la charge d'une
Il est assez difficile de donner une définition claire de la charge d'une
machine (load average). Sur le blog Nosheep, Zach en donne la définition
suivante: " C'est la somme moyenne du nombre de processus en attente dans
la queue d'execution plus le nombre de processus actuellement en train
d'être executés sur une période de temps de 1, 5 et 15 minutes."
Glances permet d'afficher les alertes en tenant compte du nombre de coeurs de
votre processeur. Par exemple, le seuil WARNING sera de 2 pour un processeur
votre processeur. Par exemple, le seuil WARNING sera de 2 pour un processeur
Bi-Core alors qu'il sera de 4 sur un Quad-Core.
Si la charge moyenne est < O.7*Core, alors le status est "OK".
@ -177,10 +177,10 @@ Si la mémoire est > 90%, alors le status "CRITICAL".
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/network.png)
Glances affiche les débits des interfaces réseau en adaptant dynamiquement
Glances affiche les débits des interfaces réseau en adaptant dynamiquement
l'unité à utiliser (bits par seconde).
Les alertes ne sont affichées que pour les interfaces dont les informations
Les alertes ne sont affichées que pour les interfaces dont les informations
sur la vitesse maximale sont disponibles (cela dépend des distributions):
Si le débit < 50%, alors le status est "OK".
@ -191,14 +191,14 @@ Si le débit > 70%, alors le status est "WARNING".
Si le débit > 90%, alors le status est "CRITICAL".
Par exemple, sur une interface Ethernet Fast Ethernet (100 Mbps), le status
Par exemple, sur une interface Ethernet Fast Ethernet (100 Mbps), le status
passera à WARNING si le débit dépasse les 70 Mbps.
### Entrées/Sorties disque
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/diskio.png)
Glances permet d'afficher les débits en lecture et écriture sur les disques
Glances permet d'afficher les débits en lecture et écriture sur les disques
en adaptant dynamiquement l'unité à utiliser (octets par seconde).
Il n'y a pas d'alerte remontée pour ce type d'information.
@ -224,7 +224,7 @@ Si l'espace disque utilisé est > 90%, alors le status est "CRITICAL".
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/processlist.png)
Glances affiche un résumé sur l'état des processus ainsi qu'une liste
Glances affiche un résumé sur l'état des processus ainsi qu'une liste
détaillée.
Le nombre des processus affichés est adapté à la taille de la fenêtre.

View File

@ -102,14 +102,14 @@ When Glances is running, you can press:
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/header.png)
The header shows the Glances version, the host name and the operating
The header shows the Glances version, the host name and the operating
system name, version and architecture.
### CPU
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/cpu.png)
The CPU states are shown as a percentage and for the configured refresh
The CPU states are shown as a percentage and for the configured refresh
time.
If user|kernel|nice CPU is < 50%, then status is set to "OK".
@ -124,12 +124,12 @@ If user|kernel|nice CPU is > 90%, then status is set to "CRITICAL".
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/load.png)
On the Nosheep blog, Zach defines the average load: "In short it is the
average sum of the number of processes waiting in the run-queue plus the
On the Nosheep blog, Zach defines the average load: "In short it is the
average sum of the number of processes waiting in the run-queue plus the
number currently executing over 1, 5, and 15 minute time periods."
Glances gets the number of CPU cores to adapt the alerts. With Glances,
alerts on average load are only set on 5 and 15 mins.
Glances gets the number of CPU cores to adapt the alerts. With Glances,
alerts on average load are only set on 5 and 15 mins.
If average load is < O.7*Core, then status is set to "OK".
@ -163,7 +163,7 @@ If memory is > 90%, then status is set to "CRITICAL".
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/network.png)
Glances display the network interface bit rate. The unit is adapted
Glances display the network interface bit rate. The unit is adapted
dynamicaly (bits per second, Kbits per second, Mbits per second...).
Alerts are set only if the network interface maximum speed is available.
@ -176,14 +176,14 @@ If bitrate is > 70%, then status is set to "WARNING".
If bitrate is > 90%, then status is set to "CRITICAL".
For exemple, on a 100 Mbps Ethernet interface, the warning status is set
For exemple, on a 100 Mbps Ethernet interface, the warning status is set
if the bit rate is higher than 70 Mbps.
### Disk I/O
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/diskio.png)
Glances display the disk I/O throughput. The unit is adapted dynamicaly
Glances display the disk I/O throughput. The unit is adapted dynamicaly
(bytes per second, Kbytes per second, Mbytes per second...).
There is no alert on this information.
@ -192,8 +192,8 @@ There is no alert on this information.
![screenshot](https://github.com/nicolargo/glances/raw/master/doc/fs.png)
Glances display the total and used filesytem disk space. The unit is
adapted dynamicaly (bytes per second, Kbytes per second, Mbytes per
Glances display the total and used filesytem disk space. The unit is
adapted dynamicaly (bytes per second, Kbytes per second, Mbytes per
second...).
Alerts are set for used disk space:
@ -212,7 +212,7 @@ If disk used is > 90%, then status is set to "CRITICAL".
Glances displays a summary and a list of processes.
By default (or if you hit the 'a' key) the process list is automaticaly
By default (or if you hit the 'a' key) the process list is automaticaly
sorted by CPU of memory consumption.
The number of processes in the list is adapted to the screen size.
@ -231,7 +231,7 @@ There is one line per alert with the following information:
* start date
* end date
* alert name
* (min/avg/max) values
* (min/avg/max) values
### Footer

View File

@ -2,7 +2,7 @@
Reset the sheet
*/
* { margin: 0; padding: 0; }
* { margin: 0; padding: 0; }
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
[hidden] { display: none; }
@ -42,24 +42,24 @@ Colors table
.bgproc { background: transparent; }
.fgproc { color: #3C8AAD; }
.bgcdefault { background: transparent; }
.bgcdefault { background: transparent; }
.fgcdefault { color: #FFFFFF; }
.bgcok { background: #60AC39; }
.bgcok { background: #60AC39; }
.fgcok { color: #FFFFFF; }
.bgccareful { background: #6039AC; }
.bgccareful { background: #6039AC; }
.fgccareful { color: #FFFFFF; }
.bgcwarning { background: #FFAA00; }
.bgcwarning { background: #FFAA00; }
.fgcwarning { color: #FFFFFF; }
.bgcritical { background: #D92626; }
.bgcritical { background: #D92626; }
.fgcritical { color: #FFFFFF; }
/*
Main
*/
html {
html {
background-image: url('../img/bg.png');
font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
}
html, button, input, select, textarea { font-family: sans-serif; }
body { margin: 0; font-size: 1em; line-height: 1.4; }
@ -126,9 +126,9 @@ tbody td{
/* Header */
header {
header {
text-align: center;
margin-bottom: 25px;
margin-bottom: 25px;
}
/* Main */
@ -138,7 +138,7 @@ header {
}
#firstline, #secondline {
margin: 0 auto;
margin: 0 auto;
}
#secondline {

View File

@ -1849,7 +1849,7 @@ class glancesCsv:
"""
This class manages the Csv output
"""
def __init__(self, cvsfile="./glances.csv", refresh_time=1):
# Global information to display
@ -1904,8 +1904,8 @@ def printSyntax():
print _("\t-d\t\tDisable disk I/O module")
print _("\t-f file\t\tSet the output folder (HTML) or file (CSV)")
print _("\t-h\t\tDisplay the syntax and exit")
print _("\t-m\t\tDisable mount module")
print _("\t-n\t\tDisable network module")
print _("\t-m\t\tDisable mount module")
print _("\t-n\t\tDisable network module")
print _("\t-o output\tDefine additional output (available: HTML or CSV)")
print _("\t-t sec\t\tSet the refresh time in seconds (default: %d)" %
refresh_time)
@ -1990,7 +1990,7 @@ def init():
else:
printSyntax()
sys.exit(0)
# Check options
if html_tag:
try:
@ -2057,10 +2057,10 @@ def main():
def end():
screen.end()
if csv_tag:
csvoutput.exit()
sys.exit(0)

View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
{% block head %}
<meta charset="utf-8">
@ -8,14 +8,14 @@
<link rel="stylesheet" href="{% block css %}css/base.css{% endblock %}">
{% endblock %}
<meta http-equiv="refresh" content="{{ refresh }}" />
</head>
</head>
<body class="bgmain fgmain">
<header>
{% block header %}{% endblock %}
</header>
<section id="main">
<section id="firstline">
<article id="cpu">
@ -47,14 +47,14 @@
<article id="proclist">
{% block proclist %}{% endblock %}
</article>
</section>
</section>
</section>
</section>
</section>
<footer>
{% block footer %}{% endblock %}
{% block footer %}{% endblock %}
</footer>
</body>
</html>

View File

@ -29,9 +29,9 @@
<td class="bgcpu fgcpu">Nice</td>
<td class="{{ cpu.nice_color }}">{{ cpu.nice|round(1) }}</td>
</tr>
</tbody>
</table>
{% endif %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% block load %}
@ -56,9 +56,9 @@
<td class="bgload fgload">15 mins</td>
<td class="{{ load.min15_color }}">{{ load.min15|round(2) }}</td>
</tr>
</tbody>
</table>
{% endif %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% block mem %}
@ -91,9 +91,9 @@
<td>{{ memswap.free|filesizeformat(binary = true) }}</td>
<td>{{ (mem.free+mem.cache)|filesizeformat(binary = true) }}</td>
</tr>
</tbody>
</table>
{% endif %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% block net %}
@ -109,22 +109,22 @@
<tbody>
{% for interface in net %}
<tr>
<td id="item">{{ interface.interface_name }}</td>
<td id="item">{{ interface.interface_name }}</td>
{% if interface.rx == 0 %}
<td>0</td>
<td>0</td>
{% else %}
<td>{{ (interface.rx*8)|filesizeformat(binary = true)|replace("Bytes", "bps")|replace("Byte", "bps")|replace("iB", "bps") }}</td>
{% endif %}
<td>{{ (interface.rx*8)|filesizeformat(binary = true)|replace("Bytes", "bps")|replace("Byte", "bps")|replace("iB", "bps") }}</td>
{% endif %}
{% if interface.tx == 0 %}
<td>0</td>
<td>0</td>
{% else %}
<td>{{ (interface.tx*8)|filesizeformat(binary = true)|replace("Bytes", "bps")|replace("Byte", "bps")|replace("iB", "bps") }}</td>
<td>{{ (interface.tx*8)|filesizeformat(binary = true)|replace("Bytes", "bps")|replace("Byte", "bps")|replace("iB", "bps") }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% block diskio %}
@ -140,14 +140,14 @@
<tbody>
{% for disk in diskio %}
<tr>
<td id="item">{{ disk.disk_name }}</td>
<td>{{ disk.write_bytes|filesizeformat(binary = true) }}</td>
<td>{{ disk.read_bytes|filesizeformat(binary = true) }}</td>
<td id="item">{{ disk.disk_name }}</td>
<td>{{ disk.write_bytes|filesizeformat(binary = true) }}</td>
<td>{{ disk.read_bytes|filesizeformat(binary = true) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% block fs %}
@ -163,14 +163,14 @@
<tbody>
{% for mount in fs %}
<tr>
<td id="item">{{ mount.mnt_point }}</td>
<td>{{ mount.size|filesizeformat(binary = true) }}</td>
<td class="{{ mount.used_color }}">{{ mount.used|filesizeformat(binary = true) }}</td>
<td id="item">{{ mount.mnt_point }}</td>
<td>{{ mount.size|filesizeformat(binary = true) }}</td>
<td class="{{ mount.used_color }}">{{ mount.used|filesizeformat(binary = true) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% block proccount %}
@ -193,9 +193,9 @@
<td>{{ proccount.sleeping }}</td>
<td>{{ proccount.total-proccount.running-proccount.sleeping }}</td>
</tr>
</tbody>
</table>
{% endif %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% block proclist %}
@ -213,17 +213,17 @@
{% for proc in proclist %}
{% if loop.index > 10 %}
{% break %}
{% endif %}
{% endif %}
<tr>
<td>{{ proc.cpu_percent }}</td>
<td>{{ proc.proc_size|filesizeformat(binary = true) }}</td>
<td>{{ proc.proc_resident|filesizeformat(binary = true) }}</td>
<td id="command">{{ proc.proc_name|truncate(40, killwords=True) }}</td>
<td>{{ proc.cpu_percent }}</td>
<td>{{ proc.proc_size|filesizeformat(binary = true) }}</td>
<td>{{ proc.proc_resident|filesizeformat(binary = true) }}</td>
<td id="command">{{ proc.proc_name|truncate(40, killwords=True) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% block footer %}

View File

@ -2,7 +2,7 @@
.SH NAME
glances \- CLI curses based monitoring tool
.SH SYNOPSIS
.B glances
.B glances
[\-h] [\-t refresh] [\-v]
.SH DESCRIPTION
Glances is a free (LGPL) curses-based monitoring tool which aims to present a maximum of information
@ -31,7 +31,7 @@ You can use the following keys to sort the processesi list:
.PP
'q' Exit
.PP
The current version grab the following stats: CPU, Load, Memory, Network rate, Disk IO, file system,
The current version grab the following stats: CPU, Load, Memory, Network rate, Disk IO, file system,
process number and details.
.SH OPTIONS
.TP
@ -53,6 +53,6 @@ Refresh information every 5 seconds:
.SH EXIT STATUS
glances returns a zero exit status if it succeeds to print/grab information.
.PP
It returns 2 if it fails to parse its options (missing arguments, invalid value, etc).
It returns 2 if it fails to parse its options (missing arguments, invalid value, etc).
.SH AUTHOR
Glances is written by Nicolargo (contact@nicolargo.com).

View File

@ -15,7 +15,7 @@ data_files = [
'NEWS',
'screenshot.png']),
('share/doc/glances/doc', glob('doc/*.png')),
('share/glances/html', glob('glances/html/*.html')),
('share/glances/html', glob('glances/html/*.html')),
('share/glances/html/css', glob('glances/css/*.css')),
('share/glances/html/img', glob('glances/img/*.png')),
]