From d997802de1c87919516291efce85aa9e98a7693c Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Sat, 14 Dec 2013 15:05:05 +0100 Subject: Fix source distribution Add missing files to MANIFEST.in Better package structure Better path handling --- MANIFEST.in | 8 +- conf/glances-monitor.conf | 104 +++++++++++++++++++++ conf/glances.conf | 99 ++++++++++++++++++++ docs/man/glances.1 | 151 ------------------------------- glances/conf/glances-with-monitored.conf | 104 --------------------- glances/conf/glances.conf | 99 -------------------- glances/glances.py | 49 +++------- man/glances.1 | 151 +++++++++++++++++++++++++++++++ requirements.txt | 2 +- setup.py | 12 +-- 10 files changed, 379 insertions(+), 400 deletions(-) create mode 100644 conf/glances-monitor.conf create mode 100644 conf/glances.conf delete mode 100644 docs/man/glances.1 delete mode 100644 glances/conf/glances-with-monitored.conf delete mode 100644 glances/conf/glances.conf create mode 100644 man/glances.1 diff --git a/MANIFEST.in b/MANIFEST.in index 1870a629..3206439a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,5 +2,11 @@ include AUTHORS include COPYING include NEWS include README.rst -recursive-include docs images/*.png man/glances.1 glances-doc.html +include conf/glances.conf +include glances/data/css/*.css +include glances/data/html/*.html +include glances/data/img/*.png +include man/glances.1 +recursive-include docs images/*.png glances-doc.html recursive-include i18n *.mo +prune docs/_build diff --git a/conf/glances-monitor.conf b/conf/glances-monitor.conf new file mode 100644 index 00000000..754fcb46 --- /dev/null +++ b/conf/glances-monitor.conf @@ -0,0 +1,104 @@ +[cpu] +# Limits values for CPU user in % +# Defaults values if not defined: 50/70/90 +user_careful=50 +user_warning=70 +user_critical=90 +# Limits values for CPU system in % +# Defaults values if not defined: 50/70/90 +system_careful=50 +system_warning=70 +system_critical=90 +# Limits values for CPU iowait in % +# Defaults values if not defined: 40/60/80 +# Not easy to tweek... +# Source: http://blog.scoutapp.com/articles/2011/02/10/understanding-disk-i-o-when-should-you-be-worried +# http://blog.logicmonitor.com/2011/04/20/troubleshooting-server-performance-and-application-monitoring-a-real-example/ +# http://blog.developpeur-neurasthenique.fr/auto-hebergement-iowait-ma-tuer-1-2-vmstat-mpstat-atop-pidstat.html (FR) +iowait_careful=40 +iowait_warning=60 +iowait_critical=80 + +[load] +# Value * Core +# Defaults values if not defined: 0.7/1.0/5.0 per Core +# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages +# http://www.linuxjournal.com/article/9001 +careful=0.7 +warning=1.0 +critical=5.0 + +[memory] +# Defaults limits for free RAM memory in % +# Defaults values if not defined: 50/70/90 +careful=50 +warning=70 +critical=90 + +[swap] +# Defaults limits for free swap memory in % +# Defaults values if not defined: 50/70/90 +careful=50 +warning=70 +critical=90 + +[temperature] +# Temperatures in °C for sensors +# Defaults values if not defined: 60/70/80 +careful=60 +warning=70 +critical=80 + +[hddtemperature] +# Temperatures in °C for hddtemp +# Defaults values if not defined: 45/52/60 +careful=45 +warning=52 +critical=60 + +[filesystem] +# Defaults limits for free filesytem space in % +# Defaults values if not defined: 50/70/90 +careful=50 +warning=70 +critical=90 + +[process] +# Limits values for CPU per process in % +# Defaults values if not defined: 50/70/90 +cpu_careful=50 +cpu_warning=70 +cpu_critical=90 +# Limits values for MEM per process in % +# Defaults values if not defined: 50/70/90 +mem_careful=50 +mem_warning=70 +mem_critical=90 + +[monitor] +# Define the list of processes to monitor +# *** This section is optionnal *** +# The list is composed of item (list_#nb <= 10) +# An item is defined: +# * description: Description of the processes (max 16 chars) +# * regex: regular expression of the processes to monitor +# * command: (optional) full path to shell command/script for extended stat +# Use with caution. Should return a single line string. +# Only execute when at least one process is running +# By default display CPU and MEM % +# Limitation: Do not use in client / server mode +# * countmin: (optional) minimal number of processes +# A warning will be displayed if number of process < count +# * countmax: (optional) maximum number of processes +# A warning will be displayed if number of process > count +list_1_description=Stress programs +list_1_regex=.*stress.* +list_1_command=stress --version +list_1_countmin=1 +list_1_countmax=4 +list_2_description=Python programs +list_2_regex=.*python.* +list_3_description=Famous Xeyes +list_3_regex=.*xeyes.* +list_3_countmin=0 +list_3_countmax=1 diff --git a/conf/glances.conf b/conf/glances.conf new file mode 100644 index 00000000..49430496 --- /dev/null +++ b/conf/glances.conf @@ -0,0 +1,99 @@ +[cpu] +# Limits values for CPU user in % +# Defaults values if not defined: 50/70/90 +user_careful=50 +user_warning=70 +user_critical=90 +# Limits values for CPU system in % +# Defaults values if not defined: 50/70/90 +system_careful=50 +system_warning=70 +system_critical=90 +# Limits values for CPU iowait in % +# Defaults values if not defined: 40/60/80 +# Not easy to tweek... +# Source: http://blog.scoutapp.com/articles/2011/02/10/understanding-disk-i-o-when-should-you-be-worried +# http://blog.logicmonitor.com/2011/04/20/troubleshooting-server-performance-and-application-monitoring-a-real-example/ +# http://blog.developpeur-neurasthenique.fr/auto-hebergement-iowait-ma-tuer-1-2-vmstat-mpstat-atop-pidstat.html (FR) +iowait_careful=40 +iowait_warning=60 +iowait_critical=80 + +[load] +# Value * Core +# Defaults values if not defined: 0.7/1.0/5.0 per Core +# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages +# http://www.linuxjournal.com/article/9001 +careful=0.7 +warning=1.0 +critical=5.0 + +[memory] +# Defaults limits for free RAM memory in % +# Defaults values if not defined: 50/70/90 +careful=50 +warning=70 +critical=90 + +[swap] +# Defaults limits for free swap memory in % +# Defaults values if not defined: 50/70/90 +careful=50 +warning=70 +critical=90 + +[temperature] +# Temperatures in °C for sensors +# Defaults values if not defined: 60/70/80 +careful=60 +warning=70 +critical=80 + +[hddtemperature] +# Temperatures in °C for hddtemp +# Defaults values if not defined: 45/52/60 +careful=45 +warning=52 +critical=60 + +[filesystem] +# Defaults limits for free filesytem space in % +# Defaults values if not defined: 50/70/90 +careful=50 +warning=70 +critical=90 + +[process] +# Limits values for CPU per process in % +# Defaults values if not defined: 50/70/90 +cpu_careful=50 +cpu_warning=70 +cpu_critical=90 +# Limits values for MEM per process in % +# Defaults values if not defined: 50/70/90 +mem_careful=50 +mem_warning=70 +mem_critical=90 + +[monitor] +# Define the list of processes to monitor +# *** This section is optionnal *** +# The list is composed of item (list_#nb <= 10) +# An item is defined: +# * description: Description of the processes (max 16 chars) +# * regex: regular expression of the processes to monitor +# * command: (optional) full path to shell command/script for extended stat +# Use with caution. Should return a single line string. +# * countmin: (optional) minimal number of processes +# A warning will be displayed if number of process < count +# * countmax: (optional) maximum number of processes +# A warning will be displayed if number of process > count +#list_1_description=Redis server +#list_1_regex=.*redis-server.* +#list_1_command=echo "Additional stats" +#list_2_description=Python programs +#list_2_regex=.*python.* +#list_2_countmin=1 +#list_2_countmax=8 +#list_3_description=Famous Xeyes +#list_3_regex=.*xeyes.* diff --git a/docs/man/glances.1 b/docs/man/glances.1 deleted file mode 100644 index ff5e77ed..00000000 --- a/docs/man/glances.1 +++ /dev/null @@ -1,151 +0,0 @@ -.TH glances 1 "September, 2013" "version 1.7.2" "USER COMMANDS" -.SH NAME -glances \- A cross-platform curses-based monitoring tool -.SH SYNOPSIS -.B glances -[\-bdehmnrsvyz1] [\-B bind] [\-c server] [\-C conffile] [\-f file] [\-o output] [\-p port] [\-P password] [\-t refresh] -.SH DESCRIPTION -Glances is a free (LGPL) cross-platform curses-based monitoring tool which aims to present a maximum of information -in a minimum of space, ideally to fit in a classical 80x24 terminal or higher to have additionnal information. -.PP -Glances can adapt dynamically the displayed information depending on the terminal size. It can also -work in a client/server mode for remote monitoring. -.PP -This tool is written in Python and uses the psutil library to fetch the statistical values from key elements, -like CPU, load average, memory, network, disks, file systems, processes, etc. -.SH COMMAND-LINE OPTIONS -The command-line options are the following: -.TP -.B \-b -Display network rate in Byte per second (default: bit per second) -.TP -.B \-B @IP|HOST -Bind server to the given IPv4/IPv6 address or hostname -.TP -.B \-c @IP|HOST -Connect to a Glances server by IPv4/IPv6 address or hostname -.TP -.B \-C FILE -Path to the configuration file -.TP -.B \-d -Disable disk I/O module -.TP -.B \-e -Enable sensors module (requires pysensors, Linux-only) -.TP -.B \-f FILE -Set the HTML output folder or CSV file -.TP -.B \-h -Display the help and exit -.TP -.B \-m -Disable mount module -.TP -.B \-n -Disable network module -.TP -.B \-o OUTPUT -Define additional output (available: HTML or CSV) -.TP -.B \-p PORT -Define the client/server TCP port (default: 61209) -.TP -.B \-P PASSWORD -Define a client/server password -.TP -.B\---password -Define a client/server password from the prompt -.TP -.B \-r -Disable process list (for low CPU consumption) -.TP -.B \-s -Run Glances in server mode -.TP -.B \-t SECONDS -Set refresh time in seconds (default: 3 sec) -.TP -.B \-v -Display the version and exit -.TP -.B \-y -Enable hddtemp module (requires hddtemp) -.TP -.B \-z -Do not use the bold color attribute -.TP -.B \-1 -Start Glances in per-CPU mode -.SH INTERACTIVE COMMANDS -You can use the following keys while in Glances: -.TP -.B a -Sort process list automatically -.TP -.B b -Switch between bit/s or Byte/s for network I/O -.TP -.B c -Sort processes by CPU usage -.TP -.B d -Show/hide disk I/O stats -.TP -.B f -Show/hide file system stats -.TP -.B h -Show/hide the help screen -.TP -.B i -Sort processes by I/O rate -.TP -.B l -Show/hide log messages -.TP -.B m -Sort processes by MEM usage -.TP -.B n -Show/hide network stats -.TP -.B p -Sort processes by name -.TP -.B q -Quit -.TP -.B s -Show/hide sensors stats (only available with -e flag) -.TP -.B t -View network I/O as combination -.TP -.B u -View cumulative network I/O -.TP -.B w -Delete finished warning log messages -.TP -.B x -Delete finished warning and critical log messages -.TP -.B y -Show/hide hddtemp stats (only available with -y flag) -.TP -.B 1 -Switch between global CPU and per-CPU stats -.SH EXAMPLES -.TP -Refresh information every 5 seconds: -.B glances -\-t 5 -.PP -.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). -.SH AUTHOR -Glances is written by Nicolas Hennion aka Nicolargo (contact@nicolargo.com) diff --git a/glances/conf/glances-with-monitored.conf b/glances/conf/glances-with-monitored.conf deleted file mode 100644 index 754fcb46..00000000 --- a/glances/conf/glances-with-monitored.conf +++ /dev/null @@ -1,104 +0,0 @@ -[cpu] -# Limits values for CPU user in % -# Defaults values if not defined: 50/70/90 -user_careful=50 -user_warning=70 -user_critical=90 -# Limits values for CPU system in % -# Defaults values if not defined: 50/70/90 -system_careful=50 -system_warning=70 -system_critical=90 -# Limits values for CPU iowait in % -# Defaults values if not defined: 40/60/80 -# Not easy to tweek... -# Source: http://blog.scoutapp.com/articles/2011/02/10/understanding-disk-i-o-when-should-you-be-worried -# http://blog.logicmonitor.com/2011/04/20/troubleshooting-server-performance-and-application-monitoring-a-real-example/ -# http://blog.developpeur-neurasthenique.fr/auto-hebergement-iowait-ma-tuer-1-2-vmstat-mpstat-atop-pidstat.html (FR) -iowait_careful=40 -iowait_warning=60 -iowait_critical=80 - -[load] -# Value * Core -# Defaults values if not defined: 0.7/1.0/5.0 per Core -# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages -# http://www.linuxjournal.com/article/9001 -careful=0.7 -warning=1.0 -critical=5.0 - -[memory] -# Defaults limits for free RAM memory in % -# Defaults values if not defined: 50/70/90 -careful=50 -warning=70 -critical=90 - -[swap] -# Defaults limits for free swap memory in % -# Defaults values if not defined: 50/70/90 -careful=50 -warning=70 -critical=90 - -[temperature] -# Temperatures in °C for sensors -# Defaults values if not defined: 60/70/80 -careful=60 -warning=70 -critical=80 - -[hddtemperature] -# Temperatures in °C for hddtemp -# Defaults values if not defined: 45/52/60 -careful=45 -warning=52 -critical=60 - -[filesystem] -# Defaults limits for free filesytem space in % -# Defaults values if not defined: 50/70/90 -careful=50 -warning=70 -critical=90 - -[process] -# Limits values for CPU per process in % -# Defaults values if not defined: 50/70/90 -cpu_careful=50 -cpu_warning=70 -cpu_critical=90 -# Limits values for MEM per process in % -# Defaults values if not defined: 50/70/90 -mem_careful=50 -mem_warning=70 -mem_critical=90 - -[monitor] -# Define the list of processes to monitor -# *** This section is optionnal *** -# The list is composed of item (list_#nb <= 10) -# An item is defined: -# * description: Description of the processes (max 16 chars) -# * regex: regular expression of the processes to monitor -# * command: (optional) full path to shell command/script for extended stat -# Use with caution. Should return a single line string. -# Only execute when at least one process is running -# By default display CPU and MEM % -# Limitation: Do not use in client / server mode -# * countmin: (optional) minimal number of processes -# A warning will be displayed if number of process < count -# * countmax: (optional) maximum number of processes -# A warning will be displayed if number of process > count -list_1_description=Stress programs -list_1_regex=.*stress.* -list_1_command=stress --version -list_1_countmin=1 -list_1_countmax=4 -list_2_description=Python programs -list_2_regex=.*python.* -list_3_description=Famous Xeyes -list_3_regex=.*xeyes.* -list_3_countmin=0 -list_3_countmax=1 diff --git a/glances/conf/glances.conf b/glances/conf/glances.conf deleted file mode 100644 index 49430496..00000000 --- a/glances/conf/glances.conf +++ /dev/null @@ -1,99 +0,0 @@ -[cpu] -# Limits values for CPU user in % -# Defaults values if not defined: 50/70/90 -user_careful=50 -user_warning=70 -user_critical=90 -# Limits values for CPU system in % -# Defaults values if not defined: 50/70/90 -system_careful=50 -system_warning=70 -system_critical=90 -# Limits values for CPU iowait in % -# Defaults values if not defined: 40/60/80 -# Not easy to tweek... -# Source: http://blog.scoutapp.com/articles/2011/02/10/understanding-disk-i-o-when-should-you-be-worried -# http://blog.logicmonitor.com/2011/04/20/troubleshooting-server-performance-and-application-monitoring-a-real-example/ -# http://blog.developpeur-neurasthenique.fr/auto-hebergement-iowait-ma-tuer-1-2-vmstat-mpstat-atop-pidstat.html (FR) -iowait_careful=40 -iowait_warning=60 -iowait_critical=80 - -[load] -# Value * Core -# Defaults values if not defined: 0.7/1.0/5.0 per Core -# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages -# http://www.linuxjournal.com/article/9001 -careful=0.7 -warning=1.0 -critical=5.0 - -[memory] -# Defaults limits for free RAM memory in % -# Defaults values if not defined: 50/70/90 -careful=50 -warning=70 -critical=90 - -[swap] -# Defaults limits for free swap memory in % -# Defaults values if not defined: 50/70/90 -careful=50 -warning=70 -critical=90 - -[temperature] -# Temperatures in °C for sensors -# Defaults values if not defined: 60/70/80 -careful=60 -warning=70 -critical=80 - -[hddtemperature] -# Temperatures in °C for hddtemp -# Defaults values if not defined: 45/52/60 -careful=45 -warning=52 -critical=60 - -[filesystem] -# Defaults limits for free filesytem space in % -# Defaults values if not defined: 50/70/90 -careful=50 -warning=70 -critical=90 - -[process] -# Limits values for CPU per process in % -# Defaults values if not defined: 50/70/90 -cpu_careful=50 -cpu_warning=70 -cpu_critical=90 -# Limits values for MEM per process in % -# Defaults values if not defined: 50/70/90 -mem_careful=50 -mem_warning=70 -mem_critical=90 - -[monitor] -# Define the list of processes to monitor -# *** This section is optionnal *** -# The list is composed of item (list_#nb <= 10) -# An item is defined: -# * description: Description of the processes (max 16 chars) -# * regex: regular expression of the processes to monitor -# * command: (optional) full path to shell command/script for extended stat -# Use with caution. Should return a single line string. -# * countmin: (optional) minimal number of processes -# A warning will be displayed if number of process < count -# * countmax: (optional) maximum number of processes -# A warning will be displayed if number of process > count -#list_1_description=Redis server -#list_1_regex=.*redis-server.* -#list_1_command=echo "Additional stats" -#list_2_description=Python programs -#list_2_regex=.*python.* -#list_2_countmin=1 -#list_2_countmax=8 -#list_3_description=Famous Xeyes -#list_3_regex=.*xeyes.* diff --git a/glances/glances.py b/glances/glances.py index 93b444c0..9c7cdc7c 100644 --- a/glances/glances.py +++ b/glances/glances.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# Glances an eye on your system +# Glances - An eye on your system # # Copyright (C) 2013 Nicolargo # @@ -172,16 +172,16 @@ else: csv_lib_tag = True # path definitions -local_path = os.path.dirname(os.path.realpath(__file__)) +work_path = os.path.realpath(os.path.dirname(__file__)) appname_path = os.path.split(sys.argv[0])[0] -sys_prefix = os.path.dirname(os.path.realpath(appname_path)) +sys_prefix = os.path.realpath(os.path.dirname(appname_path)) # i18n locale.setlocale(locale.LC_ALL, '') gettext_domain = __appname__ # get locale directory -i18n_path = os.path.join(local_path, '..', 'i18n') +i18n_path = os.path.realpath(os.path.join(work_path, '..', 'i18n')) sys_i18n_path = os.path.join(sys_prefix, 'share', 'locale') if os.path.exists(i18n_path): @@ -214,7 +214,6 @@ if is_Windows and is_colorConsole: except ImportError: import queue - class ListenGetch(threading.Thread): def __init__(self, nom=''): @@ -238,7 +237,6 @@ if is_Windows and is_colorConsole: except Exception: return default - class Screen(): COLOR_DEFAULT_WIN = '0F' # 07'#'0F' @@ -295,7 +293,6 @@ if is_Windows and is_colorConsole: self.term.restore_buffered_mode() return None - class WCurseLight(): COLOR_WHITE = colorconsole.terminal.colors["WHITE"] @@ -408,7 +405,7 @@ class Config: Get a list of config file paths, taking into account of the OS, priority and location. - * running from source: /path/to/glances/glances/conf + * running from source: /path/to/glances/conf * Linux: ~/.config/glances, /etc/glances * BSD: ~/.config/glances, /usr/local/etc/glances * Mac: ~/Library/Application Support/glances, /usr/local/etc/glances @@ -416,18 +413,18 @@ class Config: The config file will be searched in the following order of priority: * /path/to/file (via -C flag) - * /path/to/glances/glances/conf + * /path/to/glances/conf * user's home directory (per-user settings) * {/usr/local,}/etc directory (system-wide settings) """ paths = [] - conf_path = os.path.join(local_path, 'conf', self.filename) + conf_path = os.path.realpath(os.path.join(work_path, '..', 'conf')) if self.location is not None: paths.append(self.location) if os.path.exists(conf_path): - paths.append(conf_path) + paths.append(os.path.join(conf_path, self.filename)) if is_Linux or is_BSD: paths.append(os.path.join( @@ -3820,11 +3817,11 @@ class glancesHtml: # Set the HTML output file self.html_file = os.path.join(html_path, html_filename) - # Get the working path - self.work_path = self.get_work_path() + # Get data path + data_path = os.path.join(work_path, 'data') - # Set the templates path - template_path = os.path.join(self.work_path, 'html') + # Set the template path + template_path = os.path.join(data_path, 'html') environment = jinja2.Environment( loader=jinja2.FileSystemLoader(template_path), extensions=['jinja2.ext.loopcontrols']) @@ -3841,27 +3838,6 @@ class glancesHtml: 'CRITICAL': "bgcritical fgcritical" } - def get_work_path(self): - """ - Get the working path - - The data files will be searched in the following paths: - * /path/to/glances/glances/data (local) - * {/usr,/usr/local}/share/glances (system-wide) - """ - # get local and system-wide data paths - data_path = os.path.join(local_path, 'data') - sys_data_path = os.path.join(sys_prefix, 'share', __appname__) - - if os.path.exists(data_path): - work_path = data_path - elif os.path.exists(sys_data_path): - work_path = sys_data_path - else: - work_path = "" - - return work_path - def __getAlert(self, current=0, max=100): # If current < CAREFUL of max then alert = OK # If current > CAREFUL of max then alert = CAREFUL @@ -4298,6 +4274,7 @@ class GlancesClient(): # Global def #=========== + def printVersion(): print(_("Glances version ") + __version__ + _(" with PsUtil ") + psutil.__version__) diff --git a/man/glances.1 b/man/glances.1 new file mode 100644 index 00000000..ff5e77ed --- /dev/null +++ b/man/glances.1 @@ -0,0 +1,151 @@ +.TH glances 1 "September, 2013" "version 1.7.2" "USER COMMANDS" +.SH NAME +glances \- A cross-platform curses-based monitoring tool +.SH SYNOPSIS +.B glances +[\-bdehmnrsvyz1] [\-B bind] [\-c server] [\-C conffile] [\-f file] [\-o output] [\-p port] [\-P password] [\-t refresh] +.SH DESCRIPTION +Glances is a free (LGPL) cross-platform curses-based monitoring tool which aims to present a maximum of information +in a minimum of space, ideally to fit in a classical 80x24 terminal or higher to have additionnal information. +.PP +Glances can adapt dynamically the displayed information depending on the terminal size. It can also +work in a client/server mode for remote monitoring. +.PP +This tool is written in Python and uses the psutil library to fetch the statistical values from key elements, +like CPU, load average, memory, network, disks, file systems, processes, etc. +.SH COMMAND-LINE OPTIONS +The command-line options are the following: +.TP +.B \-b +Display network rate in Byte per second (default: bit per second) +.TP +.B \-B @IP|HOST +Bind server to the given IPv4/IPv6 address or hostname +.TP +.B \-c @IP|HOST +Connect to a Glances server by IPv4/IPv6 address or hostname +.TP +.B \-C FILE +Path to the configuration file +.TP +.B \-d +Disable disk I/O module +.TP +.B \-e +Enable sensors module (requires pysensors, Linux-only) +.TP +.B \-f FILE +Set the HTML output folder or CSV file +.TP +.B \-h +Display the help and exit +.TP +.B \-m +Disable mount module +.TP +.B \-n +Disable network module +.TP +.B \-o OUTPUT +Define additional output (available: HTML or CSV) +.TP +.B \-p PORT +Define the client/server TCP port (default: 61209) +.TP +.B \-P PASSWORD +Define a client/server password +.TP +.B\---password +Define a client/server password from the prompt +.TP +.B \-r +Disable process list (for low CPU consumption) +.TP +.B \-s +Run Glances in server mode +.TP +.B \-t SECONDS +Set refresh time in seconds (default: 3 sec) +.TP +.B \-v +Display the version and exit +.TP +.B \-y +Enable hddtemp module (requires hddtemp) +.TP +.B \-z +Do not use the bold color attribute +.TP +.B \-1 +Start Glances in per-CPU mode +.SH INTERACTIVE COMMANDS +You can use the following keys while in Glances: +.TP +.B a +Sort process list automatically +.TP +.B b +Switch between bit/s or Byte/s for network I/O +.TP +.B c +Sort processes by CPU usage +.TP +.B d +Show/hide disk I/O stats +.TP +.B f +Show/hide file system stats +.TP +.B h +Show/hide the help screen +.TP +.B i +Sort processes by I/O rate +.TP +.B l +Show/hide log messages +.TP +.B m +Sort processes by MEM usage +.TP +.B n +Show/hide network stats +.TP +.B p +Sort processes by name +.TP +.B q +Quit +.TP +.B s +Show/hide sensors stats (only available with -e flag) +.TP +.B t +View network I/O as combination +.TP +.B u +View cumulative network I/O +.TP +.B w +Delete finished warning log messages +.TP +.B x +Delete finished warning and critical log messages +.TP +.B y +Show/hide hddtemp stats (only available with -y flag) +.TP +.B 1 +Switch between global CPU and per-CPU stats +.SH EXAMPLES +.TP +Refresh information every 5 seconds: +.B glances +\-t 5 +.PP +.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). +.SH AUTHOR +Glances is written by Nicolas Hennion aka Nicolargo (contact@nicolargo.com) diff --git a/requirements.txt b/requirements.txt index 08df1641..eba58522 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -psutil==1.1.3 +psutil==1.2.1 diff --git a/setup.py b/setup.py index 0ece14ff..db571527 100755 --- a/setup.py +++ b/setup.py @@ -8,13 +8,9 @@ from setuptools import setup data_files = [ ('share/doc/glances', ['AUTHORS', 'COPYING', 'NEWS', 'README.rst', - 'docs/glances-doc.html', - 'glances/conf/glances.conf']), + 'conf/glances.conf', 'docs/glances-doc.html']), ('share/doc/glances/images', glob.glob('docs/images/*.png')), - ('share/glances/css', glob.glob('glances/data/css/*.css')), - ('share/glances/html', glob.glob('glances/data/html/*.html')), - ('share/glances/img', glob.glob('glances/data/img/*.png')), - ('share/man/man1', ['docs/man/glances.1']) + ('share/man/man1', ['man/glances.1']) ] if hasattr(sys, 'real_prefix') or 'bsd' in sys.platform: @@ -25,7 +21,7 @@ elif 'darwin' in sys.platform: conf_path = os.path.join('/usr/local', 'etc', 'glances') elif 'win32' in sys.platform: conf_path = os.path.join(os.environ.get('APPDATA'), 'glances') -data_files.append((conf_path, ['glances/conf/glances.conf'])) +data_files.append((conf_path, ['conf/glances.conf'])) for mo in glob.glob('i18n/*/LC_MESSAGES/*.mo'): data_files.append((os.path.dirname(mo).replace('i18n/', 'share/locale/'), [mo])) @@ -43,7 +39,7 @@ setup( author='Nicolas Hennion', author_email='nicolas@nicolargo.com', url='https://github.com/nicolargo/glances', - # Alternative download_url='https://s3.amazonaws.com/glances/glances-1.7.1.tar.gz', + # download_url='https://s3.amazonaws.com/glances/glances-1.7.1.tar.gz', license="LGPL", keywords="cli curses monitoring system", install_requires=requires, -- cgit v1.2.3