Skip to content

Install and test Glances DEVELOP version

Nicolas Hennion edited this page Aug 25, 2014 · 33 revisions

If you want to install and test the DEVELOP branch without deleting/uninstall your stable version, you have two options:

  1. [https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version#use-a-python-virtual-environment](Use a Python virtual environment)
  2. Use a Docker container

Use a Python virtual environment

Create a virtual environment

pip install virtualenv
virtualenv ~/glances-venv

Install latest libraries

Note: you need to install python-dev on you system before installing PSUtil (ex: apt-get install python-dev)

Note 2: if you have sensors, you should install LM-Sensors before installing P3Sensors (ex: apt-get install lm-sensors)

Note 3: If you want to install MatPlotLib, you should install the deps (ex: sudo apt-get build-dep python-matplotlib)

Install the following libs:

~/glances-venv/bin/pip install psutil

and optionnaly:

~/glances-venv/bin/pip install bottle
~/glances-venv/bin/pip install batinfo
~/glances-venv/bin/pip install https://bitbucket.org/gleb_zhulik/py3sensors/get/tip.tar.gz
~/glances-venv/bin/pip install matplotlib

Only on Windows operating system:

~/glances-venv/bin/pip install colorconsole

Download Glances (develop branch)

mkdir ~/tmp
cd ~/tmp
git clone -b develop https://github.com/nicolargo/glances.git

Run the Glances DEVELOP version

Standalone mode

Run the CLI with the default configuration file using:

cd ~/tmp/glances
LANGUAGE=en_US.utf8  ~/glances-venv/bin/python -m glances -d -C ~/tmp/glances/conf/glances.conf

To test the monitored processes list configuration file:

cd ~/tmp/glances
LANGUAGE=en_US.utf8  ~/glances-venv/bin/python -m glances -d -C ~/tmp/glances/conf/glances-test.conf

Client/Server mode

Run the server:

cd ~/tmp/glances
LANGUAGE=en_US.utf8  ~/glances-venv/bin/python -m glances -d -C ~/tmp/glances/conf/glances-test.conf -s

And the client:

cd ~/tmp/glances
LANGUAGE=en_US.utf8  ~/glances-venv/bin/python -m glances -d -C ~/tmp/glances/conf/glances-test.conf -c @IPSERVER

Where @IPSERVER is the IP address or hostname where the Glances server is running (localhost if server and client are ran on the same machine).

Note: if the Glances server is not running, Glances client try to fallback to SNMP server (experimental feature).

Webserver mode

Run the server:

cd ~/tmp/glances
LANGUAGE=en_US.utf8  ~/glances-venv/bin/python -m glances -d -C ~/tmp/glances/conf/glances-test.conf -w

And the client in your favorite Web browser: http://@IPSERVER:61208

Where @IPSERVER is the IP address or hostname where the Glances server is running (localhost if server and client are ran on the same machine).

Use a Docker container

You need to have Docker.io installed on your system (https://www.docker.io/gettingstarted/)

Then create the image using:

sudo docker.io build -t nicolargo:glances-develop https://raw.githubusercontent.com/nicolargo/dockersfiles/master/glances_develop_install

Test Glances by running your container:

sudo docker.io run -i -t --entrypoint /bin/bash nicolargo:glances-develop -c "cd glances ; git pull origin develop ; python -m glances -d"

How to report a bug ?

First of all, try to run Glances with the -d (Debug) flag on the command line. A /tmp/glances.log file will be generated with a lot of information.

You need a GitHub account (it's free...) to log bug on the Glances' tracker.

Click on this link and enter the following informations:

  • Glances and PsUtil version (can be retreived with the ~/glances-venv/bin/python -m glances -V command)
  • System configuration: Operating system name and version (output of uname -a and python -V on GNU/Linux)
  • Problem description (in English) and optionnaly error message displayed by Glances
  • A copy/paste of relevant messages in the log file (/tmp/glances.log)

Thks !