Glances a new system-monitor tool for your GNU/Linux
Linux - GeneralThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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
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/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.
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: