-   Linux - General (
-   -   Glances a new system-monitor tool for your GNU/Linux (

onebuck 02-05-2013 10:28 PM

Glances a new system-monitor tool for your GNU/Linux

Glances a new system-monitor tool;

Most of this post is based on the information found in the blog of Nicolargo, the author of this tool.
Glances is a free software (licensed under LGPL) to monitor your GNU/Linux or BSD operating system from a text interface. Glances uses the library libstatgrab to retrieve information from your system and it is developed in Python.
So another top/htop clone ?
Yes and no, an unique thing about glances that I’ve immediately seen is that you can configure thresholds in its configuration file and see the status of your system resources with colors that indicates if everything is fine or not, at a glance
Other useful links in Links for Helpful Linux articles & books

TB0ne 02-07-2013 10:27 AM

Nice find! Thanks

onebuck 02-07-2013 10:38 AM

Member Response

Your Welcome!
Please share which Gnu/Linux you choose to install too and any problems that may occur. Hopefully that information may help other users. :)

brianL 02-07-2013 02:59 PM

Working OK on Slackware64 14.0. Easily installed (an alternative, maybe better way, would be to create a Slackware package):

# sbopkg -i pip.sqf -k

# pip install Glances

suicidaleggroll 02-07-2013 04:10 PM

I'm afraid on OpenSUSE it has some issues. Installation went easy enough, but the program itself reports incorrect data and crashes every few minutes.

Its reported memory usage is completely different than that of free, and a couple of minutes ago it reported that one of my processes was using 12000% CPU. I like the layout and the idea, and I could get past the incorrect reporting when it comes to memory, but the constant crashing makes it useless to me.

It looks like from the crash report that it's trying to look up the username for a UID that does not exist on the system, which causes a cascade of failures in the program.

If it helps, here's the actual output:

Traceback (most recent call last):
File "/usr/local/bin/glances", line 9, in <module> load_entry_point('Glances==1.6', 'console_scripts', 'glances')()
File "/usr/local/lib/python2.7/site-packages/glances/", line 3679, in main stats.update()
File "/usr/local/lib/python2.7/site-packages/glances/", line 1067, in update self.__update__(input_stats)
File "/usr/local/lib/python2.7/site-packages/glances/", line 1049, in __update__self.glancesgrabprocesses.update()
File "/usr/local/lib/python2.7/site-packages/glances/", line 723, in update procstat = self.__get_process_stats__(proc)
File "/usr/local/lib/python2.7/site-packages/glances/", line 670, in __get_process_stats__procstat['username'] = proc.username
File "/usr/local/lib64/python2.7/site-packages/psutil/", line 306, in username return pwd.getpwuid(self.uids.real).pw_name
KeyError: 'getpwuid(): uid not found: 1002'

The line terminators were all broken in the output, so I tried to put them back in where necessary.

It appears to be mostly working on Fedora though, other than the unrealistic network speeds it keeps reporting.

Philip Lacroix 02-07-2013 06:44 PM

1 Attachment(s)
Thanks for sharing! A really nice tool, I installed it on Debian wheezy (from sid) and it is running smoothly :-)

Attachment 11793

[Edit] Regarding the network monitor's output, I compared it with gnome-system-monitor during a download and in my case the values are not identical, but very close.

brianL 02-07-2013 08:08 PM

Seems to work OK on SlackwareARM (same installation method, of course). This is on my Raspberry Pi.

rng 02-08-2013 08:42 AM

It is not in Debian-Testing (Wheezy) repository because of the freeze but I installed it from sid with help from the forum:

Can I set it up to start automatically in a terminal at startup? I am using lxde with lightdm.

Philip Lacroix 02-08-2013 01:37 PM


Originally Posted by rng (Post 4886997)
Can I set it up to start automatically in a terminal at startup? I am using lxde with lightdm.

Yes, for example you can add a line like this at the end of /etc/xdg/lxsession/LXDE/autostart:


/usr/bin/xterm -maximized glances
Kind regards,

Philip Lacroix 02-08-2013 05:09 PM

The previous will work for every user starting Lxde. If you want to have glances (or other applications) to be automatically started for a particular user, I'm not sure which is the best solution, but this one will work. Create a new file in your home directory, calling it for example .lxde-autostart, then edit it as a simple shell script:


# ~/.lxde-autostart

/usr/bin/xterm -maximized glances &

Save it, then make it executable:


chmod 755 .lxde-autostart
Add the following line at the end of /etc/xdg/lxsession/LXDE/autostart:


This way, different users can have different applications to be listed in their own .lxde-autostart file.
Maybe we've gone slightly off-topic...

Kind regards,

rng 02-08-2013 07:50 PM

Thanks. From another source I found that I can start it from ~/.config/lxsession/LXDE/autostart file also.

Philip Lacroix 02-08-2013 08:26 PM

You're welcome. This is a better solution (*the* solution!) but for some reason I don't have that .config/lxsession/ path in my home directory.

Best regards,

Philip Lacroix 02-09-2013 03:11 PM

glances fine on slackware 13.37
1 Attachment(s)
Glances is working fine on Slackware 13.37 too. I'll post here the steps.

Attachment 11801

First I downloaded and installed python's setuptools (for python v2.6):


sh setuptools-0.6c11-py2.6.egg
The same with psutil:


tar -xvvzf psutil-0.6.1.tar.gz
cd ~/psutil-0.6.1/
python install

Finally I installed glances:


tar -xvvzf nicolargo-glances-v1.6-9-de0e47d.tar.gz
cd ~/nicolargo-glances-de0e47d/
python install



Philip Lacroix 12-07-2013 04:51 AM

SlackBuild available

Originally Posted by brianL (Post 4886451)
Working OK on Slackware64 14.0. Easily installed (an alternative, maybe better way, would be to create a Slackware package)

Done. The SlackBuild for glances is now available here:


All times are GMT -5. The time now is 04:37 PM.