LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-05-2013, 09:28 PM   #1
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,203
Blog Entries: 3

Rep: Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431
Glances a new system-monitor tool for your GNU/Linux


Hi,

Glances a new system-monitor tool;
Quote:
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

Last edited by onebuck; 05-26-2013 at 10:18 AM. Reason: add link
 
Old 02-07-2013, 09:27 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,592

Rep: Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559
Nice find! Thanks
 
Old 02-07-2013, 09:38 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,203
Blog Entries: 3

Original Poster
Rep: Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431Reputation: 1431
Member Response

Hi,

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.
 
Old 02-07-2013, 01:59 PM   #4
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,030
Blog Entries: 52

Rep: Reputation: Disabled
Working OK on Slackware64 14.0. Easily installed (an alternative, maybe better way, would be to create a Slackware package):
Code:
# sbopkg -i pip.sqf -k
then:
Code:
# pip install Glances

Last edited by brianL; 07-27-2014 at 07:32 AM.
 
Old 02-07-2013, 03:10 PM   #5
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,836

Rep: Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003
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:
Code:
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/glances.py", line 3679, in main stats.update()
File "/usr/local/lib/python2.7/site-packages/glances/glances.py", line 1067, in update self.__update__(input_stats)
File "/usr/local/lib/python2.7/site-packages/glances/glances.py", line 1049, in __update__self.glancesgrabprocesses.update()
File "/usr/local/lib/python2.7/site-packages/glances/glances.py", line 723, in update procstat = self.__get_process_stats__(proc)
File "/usr/local/lib/python2.7/site-packages/glances/glances.py", line 670, in __get_process_stats__procstat['username'] = proc.username
File "/usr/local/lib64/python2.7/site-packages/psutil/__init__.py", 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.

Last edited by suicidaleggroll; 02-07-2013 at 03:38 PM.
 
Old 02-07-2013, 05:44 PM   #6
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware, FreeBSD
Posts: 177

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

glances_wheezy.png

[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.

Last edited by Philip Lacroix; 02-07-2013 at 10:34 PM.
 
Old 02-07-2013, 07:08 PM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,030
Blog Entries: 52

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

Last edited by brianL; 07-27-2014 at 07:32 AM.
 
Old 02-08-2013, 07:42 AM   #8
rng
Member
 
Registered: Aug 2011
Posts: 747

Rep: Reputation: 23
It is not in Debian-Testing (Wheezy) repository because of the freeze but I installed it from sid with help from the forum:
http://www.linuxquestions.org/questi...ng-4175447932/

Can I set it up to start automatically in a terminal at startup? I am using lxde with lightdm.
 
Old 02-08-2013, 12:37 PM   #9
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware, FreeBSD
Posts: 177

Rep: Reputation: 84
Quote:
Originally Posted by rng View Post
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:

Code:
/usr/bin/xterm -maximized glances
Kind regards,
Philip

Last edited by Philip Lacroix; 02-08-2013 at 07:15 PM.
 
Old 02-08-2013, 04:09 PM   #10
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware, FreeBSD
Posts: 177

Rep: Reputation: 84
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:

Code:
#!/bin/bash
#
# ~/.lxde-autostart

/usr/bin/xterm -maximized glances &
Save it, then make it executable:

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

Code:
~/.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,
Philip

Last edited by Philip Lacroix; 02-08-2013 at 08:59 PM.
 
Old 02-08-2013, 06:50 PM   #11
rng
Member
 
Registered: Aug 2011
Posts: 747

Rep: Reputation: 23
Thanks. From another source I found that I can start it from ~/.config/lxsession/LXDE/autostart file also.
 
Old 02-08-2013, 07:26 PM   #12
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware, FreeBSD
Posts: 177

Rep: Reputation: 84
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
 
Old 02-09-2013, 02:11 PM   #13
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware, FreeBSD
Posts: 177

Rep: Reputation: 84
glances fine on slackware 13.37

Glances is working fine on Slackware 13.37 too. I'll post here the steps.

glances_slack_13.37.png

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

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

Code:
tar -xvvzf psutil-0.6.1.tar.gz
cd ~/psutil-0.6.1/
python setup.py install
Finally I installed glances:

Code:
tar -xvvzf nicolargo-glances-v1.6-9-de0e47d.tar.gz
cd ~/nicolargo-glances-de0e47d/
python setup.py install
Downloads:
http://pypi.python.org/pypi/setuptoo...-x-linux-other
http://pypi.python.org/pypi/psutil/
http://nicolargo.github.com/glances/

Regards,
Philip
 
Old 12-07-2013, 03:51 AM   #14
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware, FreeBSD
Posts: 177

Rep: Reputation: 84
SlackBuild available

Quote:
Originally Posted by brianL View Post
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:

http://slackbuilds.org/repository/14.1/system/glances/

Cheers
 
  


Reply

Tags
monitoring, pypi, python, system-monitor, thresholds, tool, top, utility


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Glances a new system-monitor tool LXer Syndicated Linux News 0 02-04-2013 03:39 AM
LXer: Keep an Eye on Your GNU/Linux System with Glances LXer Syndicated Linux News 0 03-13-2012 12:00 PM
Which tool to use for creating a new software in GNU/Linux? montylee Programming 5 07-21-2007 12:40 AM
LXer: Development tool availability and the rise of GNU/Linux LXer Syndicated Linux News 0 07-06-2006 08:54 PM
LXer: strace - A very powerful troubleshooting tool for all GNU/Linux users LXer Syndicated Linux News 0 05-05-2006 10:21 PM


All times are GMT -5. The time now is 01:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration