nicolargo / glances Goto Github PK
View Code? Open in Web Editor NEWGlances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Home Page: http://nicolargo.github.io/glances/
License: Other
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Home Page: http://nicolargo.github.io/glances/
License: Other
Télécharge la version beta de glances et tester sur une Gentoo à jour.
Version de PSutil : 0.3.0, et de python : 2.7
Je lance glances.py, qui m'affiche l'écran correctement, fais 1 rafraîchissement et plante avec la trace suivante :
Traceback (most recent call last):
File "./glances.py", line 1372, in
main()
File "./glances.py", line 1352, in main
stats.update()
File "./glances.py", line 511, in update
self.update()
File "./glances.py", line 495, in update
self.process_all.remove(proc)
File "/usr/lib64/python2.7/site-packages/psutil/init.py", line 131, in eq
h2 = (other.pid, other.create_time)
File "/usr/lib64/python2.7/site-packages/psutil/init.py", line 253, in create_time
return self._platform_impl.get_process_create_time()
File "/usr/lib64/python2.7/site-packages/psutil/_pslinux.py", line 251, in wrapper
raise NoSuchProcess(self.pid, self._process_name)
psutil.error.NoSuchProcess: process no longer exists (pid=8835)
Hi,
The documentation is suffering of lacks about dependences. AFAIK, there are
python2-psutil, pystatgrab et optionally python2-jinja
These indications are useful for packagers :)
Thank you.
Salut,
Traceback : http://pastebin.com/KHBYSUrF
Merci !
@+
I just want to tell that I can make Fedora package... interessed ?
message d'erreur :
Traceback (most recent call last):
File "/usr/bin/glances", line 704, in
main()
File "/usr/bin/glances", line 688, in main
screen.update(stats)
File "/usr/bin/glances", line 404, in update
self.display(stats)
File "/usr/bin/glances", line 390, in display
screen.displayFs(stats.getFs(), net_count + disk_count)
File "/usr/bin/glances", line 557, in displayFs
self.term_window.addnstr(self.fs_y+1+mounted, self.fs_x, fs[mounted]['mnt_point'], 8)
_curses.error: addnstr() returned ERR
Python 2.7.2
Version de python: 2.7.2
Version de libstatgrab: Version : 0.17
Révision : 1.fc16
Version de python-statgrab:
Version : 0.5
Révision : 8.fc15
os version : 3.1.5-6.fc16.i686.PAE linux fedora 16
info complémentaire : je testé juste après install ( via yum ) et ca marchait ( via ssh externe ). je suis rentré chez moi, rebooté la machine et en local le soft marche plus .
How to reproduce:
glances.py -t 60
press ctrl - C (sigint)
Observe :)
I would expect the program stops just after the signal.
Thanks.
Quand je lance glances j'obtiens des lignes dupliquées au niveau des statistiques file system.
Glances v1.4b10
psutil v0.4.0
Mount B Total Used
/ 49.2G 41.0G
/ 49.2G 41.0G
/boot 484.2M 80.1M
/dev 1.9G 0
/dev/hug 0 0
/dev/hug 0 0
/dev/mqu 0 0
Hi,
I've got an issue while launching glances.
aptitude install python-setuptools build-essential python-dev
tar zxvf glances-1.4.tar.gz
cd glances-1.4
python setup.py install
Here's my issue.
Traceback (most recent call last):
File "./glances.py", line 59, in <module>
import psutil
File "/usr/local/lib/python2.6/dist-packages/psutil-0.5.1-py2.6-linux-i686.egg/p sutil/__init__.py", line 94, in <module>
TOTAL_PHYMEM = _psplatform.phymem_usage()[0]
File "/usr/local/lib/python2.6/dist-packages/psutil-0.5.1-py2.6-linux-i686.egg/p sutil/_pslinux.py", line 140, in phymem_usage
cached = cached_phymem()
File "/usr/local/lib/python2.6/dist-packages/psutil-0.5.1-py2.6-linux-i686.egg/p sutil/_pslinux.py", line 121, in cached_phymem
raise RuntimeError("line not found")
RuntimeError: line not found
I've made some google but nothing revelent...
Thanks by advance.
Le traceback complet:
Traceback (most recent call last):
File "/usr/bin/glances", line 704, in
main()
File "/usr/bin/glances", line 688, in main
screen.update(stats)
File "/usr/bin/glances", line 404, in update
self.display(stats)
File "/usr/bin/glances", line 390, in display
screen.displayFs(stats.getFs(), net_count + disk_count)
File "/usr/bin/glances", line 557, in displayFs
self.term_window.addnstr(self.fs_y+1+mounted, self.fs_x, fs[mounted]['mnt_point'], 8)
_curses.error: addnstr() returned ERR
Et les informations complémentaires:
[madko@taygeta ~]$ python -V
Python 2.7.2
[madko@taygeta ~]$ rpm -q libstatgrab
libstatgrab-0.17-1.fc16.x86_64
[madko@taygeta ~]$ rpm -q pystatgrab
pystatgrab-0.5-8.fc15.x86_64
Lancé depuis Konsole. Pas de problème en 80x24 mais dès que j'agrandit, plantage.
Arch Linux
Erreur lors de l'initialisation de libstatgrab:
$ glances.py
File "/usr/local/bin/glances.py", line 53
print "Error: Can not init the libstatgrab library.\n"
^
SyntaxError: invalid syntax
$ pacman -Q pystatgrab
pystatgrab 0.5-4
$ pacman -Q libstatgrab
libstatgrab 0.17-1
$ uname -a
Linux pp575 3.1.4-1-ARCH #1 SMP PREEMPT Tue Nov 29 09:08:04 UTC 2011 i686 Intel(R) Core(TM)2 Duo CPU T9550 @ 2.66GHz GenuineIntel GNU/Linux
Glances v1.3.3 n'affiche pas correctement les partitions montées sur Ubuntu 11.10. J'ai uniquement la racine ( / ) comme le montre la capture d'écran suivante : http://i49.servimg.com/u/f49/11/19/52/01/glance10.png
Ci-joint le fichier /etc/mtab
rootfs / rootfs rw 0 0
/dev/root / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev /dev devtmpfs rw,relatime,size=1020784k,nr_inodes=255196,mode=755 0 0
none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
none /run tmpfs rw,nosuid,noexec,relatime,size=204220k,mode=755 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
/dev/sda2 /home ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/sda2 /home/user/dir1/ftp ext4 rw,relatime,barrier=1,data=ordered 0 0 // Cette ligne est normal, il s'agit d'un --bind pour vsftpd
A noter que je n'ai aucun problème sur Ubuntu 11.04 et Debian 6.
I get this log:
Traceback (most recent call last):
File « /usr/local/bin/glances.py », line 953, in
main()
File « /usr/local/bin/glances.py », line 929, in main
init()
File « /usr/local/bin/glances.py », line 924, in init
screen = glancesScreen(refresh_time)
File « /usr/local/bin/glances.py », line 335, in init
curses.curs_set(0)
_curses.error: curs_set() returned ERR
Glances runs well locally and from a remote access with ubuntu.
Bonjour,
Il manque certaines informations à propos du CPU, à mon goût.
Je trouve qu'il devrait y avoir les traditionnelles %user %nice %system %iowait %steal %idle. Bon pour le steal, c'est seulement utile avec des VM. Mais ne pas avoir l'iowait estun gros manque.
Qu'en penses-tu ?
Cordialement.
Cas typique avec la virtualisation, une VM tourne, utilisant une interface (par ex ici vnet0). On lance glances, là VM s'arrête, supprimant son interface réseau, hop plantage:
glances:628:displayNetwork:KeyError: 'vnet0'
Traceback (most recent call last):
File "/usr/bin/glances", line 839, in
main()
File "/usr/bin/glances", line 823, in main
screen.update(stats)
File "/usr/bin/glances", line 495, in update
self.display(stats)
File "/usr/bin/glances", line 479, in display
network_count = screen.displayNetwork(stats.getNetwork(), stats.getNetworkInterface())
File "/usr/bin/glances", line 628, in displayNetwork
self.term_window.addnstr(self.network_y+1+i, self.network_x+10, self.__autoUnit(network[i]['rx']/elapsed_time_8) + "b", 8, self.__getColor(network[i]['rx']/elapsed_time_8, speed[network[i]['interface_name']]))
KeyError: 'vnet0'
Local variables in innermost frame:
screen_y: 72
screen_x: 237
network: [{'tx': 140040L, 'rx': 140040L, 'systime': 1, 'ipackets': 136L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 136L, 'ierrors': 0L, 'interface_name': 'lo'}, {'tx': 0L, 'rx': 0L, 'systime': 1, 'ipackets': 0L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 0L, 'ierrors': 0L, 'interface_name': 'wlan0'}, {'tx': 5240L, 'rx': 153904L, 'systime': 1, 'ipackets': 209L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 71L, 'ierrors': 0L, 'interface_name': 'eth0'}, {'tx': 0L, 'rx': 0L, 'systime': 1, 'ipackets': 0L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 0L, 'ierrors': 0L, 'interface_name': 'virbr1'}, {'tx': 0L, 'rx': 0L, 'systime': 1, 'ipackets': 0L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 0L, 'ierrors': 0L, 'interface_name': 'virbr1-nic'}, {'tx': 0L, 'rx': 0L, 'systime': 1, 'ipackets': 0L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 0L, 'ierrors': 0L, 'interface_name': 'virbr2'}, {'tx': 0L, 'rx': 0L, 'systime': 1, 'ipackets': 0L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 0L, 'ierrors': 0L, 'interface_name': 'virbr2-nic'}, {'tx': 0L, 'rx': 0L, 'systime': 1, 'ipackets': 0L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 0L, 'ierrors': 0L, 'interface_name': 'virbr0'}, {'tx': 0L, 'rx': 0L, 'systime': 1, 'ipackets': 0L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 0L, 'ierrors': 0L, 'interface_name': 'virbr0-nic'}, {'tx': 13660L, 'rx': 0L, 'systime': 1326897535, 'ipackets': 0L, 'oerrors': 0L, 'collisions': 0L, 'opackets': 257L, 'ierrors': 0L, 'interface_name': 'vnet0'}]
i: 9
self: <main.glancesScreen instance at 0x262b998>
networkinterface: [{'duplex': 2, 'interface_name': 'lo', 'speed': 0, 'up': 1}, {'duplex': 2, 'interface_name': 'wlan0', 'speed': 0, 'up': 0}, {'duplex': 0, 'interface_name': 'eth0', 'speed': 1000, 'up': 1}, {'duplex': 2, 'interface_name': 'virbr1', 'speed': 0, 'up': 1}, {'duplex': 0, 'interface_name': 'virbr1-nic', 'speed': 10, 'up': 0}, {'duplex': 2, 'interface_name': 'virbr2', 'speed': 0, 'up': 1}, {'duplex': 0, 'interface_name': 'virbr2-nic', 'speed': 10, 'up': 0}, {'duplex': 2, 'interface_name': 'virbr0', 'speed': 0, 'up': 1}, {'duplex': 0, 'interface_name': 'virbr0-nic', 'speed': 10, 'up': 0}]
elapsed_time: 1326897535
speed: {'lo': 0, 'virbr0-nic': 10000000, 'wlan0': 0, 'virbr1-nic': 10000000, 'virbr0': 0, 'virbr2-nic': 10000000, 'virbr2': 0, 'virbr1': 0, 'eth0': 1000000000}
Peut être sécuriser l'accès aux données du tableau network. Pas urgent comme bug non plus. Le problème arrive avec la version 1.3.4 en tout cas, j'ai pas testé avec la version 1.3.5.
[edouard@oberon ~]$ python -V
Python 2.7.2
[edouard@oberon ~]$ rpm -q libstatgrab
libstatgrab-0.17-1.fc16.x86_64
[edouard@oberon ~]$ rpm -q pystatgrab
pystatgrab-0.5-8.fc15.x86_64
[edouard@oberon ~]$ rpm -q glances
Cordialement.
Some options would be very cool: (using a config file for example)
L'ajout de paramètres serait bien (à partir d'un fichier de config par exemple)
When I compile glance for Archlinux, with apropriate dependancy installed, I have the following error :
Glances work fine still.
libstatgrab : v0.17-1
pystatgrab : v0.5-4
python : v2.7.2
Hi,
I've compiled/installed glances on my Debian 'Squeeze' machine, but starting glances gives errors:
Traceback (most recent call last):es/glances-1.3.5 $ glances.py
File "/usr/local/bin/glances.py", line 914, in <module>
main()
File "/usr/local/bin/glances.py", line 890, in main
init()
File "/usr/local/bin/glances.py", line 885, in init
screen = glancesScreen(refresh_time)
File "/usr/local/bin/glances.py", line 311, in __init__
curses.use_default_colors()
_curses.error: use_default_colors() returned ERR
Python version: 2.6.6-3+squeeze6
pystatgrab 0.5 is installed according to instructions (is there a way for me to verify that it installed correctly?)
Might be relevant: I connect to the Debian machine from a Windows-7 machine using PuTTY.
Any other information you need - just let me know.
Kind regards,
Matthijs
It is useful to have a graph view rather than a list of values. Colors code help for sure but is it possible to replace number value by a graph ? I mean text graph of course, like progress bar or something like that.
And the best would be to have possibilities to export data gathered by glances into a csv, rrd, or whatever file to exploit later and present an overview of a running system.
After said that, it remind me a tool named 'nmon' used to monitor servers performance sometimes.
Debian 6.0.3
Glances 1.3.7
Python 2.6.6
PyStatGrab 0.5
Statgrab 0.16
Erreur renvoyée au lancement de glances.py :
Traceback (most recent call last): File « /usr/local/bin/glances.py »,
line 1186, in main() File « /usr/local/bin/glances.py », line 1161, in main init()
File « /usr/local/bin/glances.py », line 1155, in init screen = glancesScreen(refresh_time)
File « /usr/local/bin/glances.py », line 473, in init curses.curs_set(0) _curses.error: curs_set() returned ERR
./glances.py
File "./glances.py", line 44
print _('Textmode GUI initialization failed, Glances cannot start.')
SyntaxError: invalid syntax
Version de pip: 1.0.2 from /usr/lib/python3.2/site-packages (python 3.2)
Version de python: 3.2.2-2
I'm trying to install Glances on Debian (squeeze 6.0.3).
When I make
the project, I get a warning about autoconf.
cd . && /bin/sh /root/glances-1.3.5/missing --run automake-1.11 --gnu
aclocal.m4:16: warning: this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /root/glances-1.3.5/missing --run autoconf
...
But, everything else seems to work, even make install
, until I launch glances.py
.
I then get this kind of output:
*** glibc detected *** /usr/bin/python: free(): invalid pointer: 0x00007fa9aeee1461 ***
======= Backtrace: =========
/lib/libc.so.6(+0x71ad6)[0x7fa9af169ad6]
/lib/libc.so.6(cfree+0x6c)[0x7fa9af16e84c]
/usr/lib/libstatgrab.so.6(sg_vector_resize+0x4e)[0x7fa9aeacb36e]
/usr/lib/libstatgrab.so.6(sg_get_process_stats+0x14e)[0x7fa9aeaca82e]
/usr/lib/libstatgrab.so.6(sg_get_process_count+0x40)[0x7fa9aeacacf0]
/usr/lib/pymodules/python2.6/_statgrab.so(+0xcedd)[0x7fa9aecdcedd]
/usr/bin/python(PyEval_EvalFrameEx+0x5165)[0x4a7ba5]
/usr/bin/python(PyEval_EvalFrameEx+0x5a60)[0x4a84a0]
======= Memory map: ========
...
Bonjour,
Je pense que je vais installé ton produit dans la distribution serveur qui me sert de support pour mes 200 sites.
Si tu veux je peux prendre en charge le packaging Debian et l'hebergement sur notre repository.
Cela ne sera pas dans Debian Main, mais c'est un début.
Si tu es intéressé, je te donne mon mail et mon jabber.
[email protected]
[email protected]
Tu peux aussi me joindre par GitHub.
Voici l'url de notre distro si tu veux voir un peux ce que je fais avec mon equipe.
http://dev.giprecia.fr
http://dev.giprecia.fr/project/escolan-uhs-builder
Stéphane.
Debian Wheezy
Python 2.7.2
Installed pystatgrab-0.5 as directed in readme.md
i3wm
Traceback here - http://pastebin.com/VHT8j9ML
This happens when I open a new window/program that resizes the term window displaying glances.
Linux kernel 3.2.1 x86_64 4 core
"migration" is a kernel proces that distributes processes over cores it runs with priority RT in top
glances shows them as consuming too much CPU, may be a problem in the dependency monitor library
glances (top 3 processes):
Cpu % Size MB Res MB Name
71.3 0 0 migration/3
68.2 0 0 migration/0
67.1 0 0 migration/1
top (top 3 processes:)
20 0 151m 7972 2564 S 4 0.2 0:10.99 glances.py
20 0 655m 136m 28m S 2 3.5 15:01.93 plugin-containe
0 165m 45m 9300 S 2 1.2 85:26.48 X
PSutil installé version : 0.4.1
glances installé branches expérimental 1.4
quand je lance glances.py -->
Traceback (most recent call last):
File « glances/glances.py », line 1565, in
main()
File « glances/glances.py », line 1541, in main
stats.update()
File « glances/glances.py », line 546, in update
self.update()
File « glances/glances.py », line 374, in update
self.cputime_total_old = self.cputime_old.user+self.cputime_old.nice+self.cputime_old.system+self.cputime_old.idle+self.cputime_old.iowait+self.cputime_old.irq+self.cputime_old.softirq
AttributeError: ‘cputimes’ object has no attribute ‘iowait’
Salut,
j'ai voulu l'installer sur mon serveur qui est sous Debian squeeze et ai obtenu cette erreur:
Traceback (most recent call last):
File "/usr/local/bin/glances.py", line 936, in
main()
File "/usr/local/bin/glances.py", line 912, in main
init()
File "/usr/local/bin/glances.py", line 907, in init
screen = glancesScreen(refresh_time)
File "/usr/local/bin/glances.py", line 328, in init
curses.noecho() ; curses.cbreak() ; curses.curs_set(0)
_curses.error: curs_set() returned ERR
As-tu une idée d'où cela peut venir?
Merci!
Les fichiers non executables ne doivent pas avoir de shebang, c'est comme ça, c'est la vie. Donc quand j'installe glances 1.4 sur ma Fedora, /usr/lib/python2.7/site-packages/glances/glances.py ne devrait pas avoir de shebang.
Voilà c'est pas énorme comme bug ;)
Hi,
Already Glance-addict for a while (v 1.2), I tried latest version (1.4) on my Ubuntu Lucid.
Installation was done via .tar.gz file, and the command "sudo python setup.py install"
First, I had to install Ubuntu package python-setuptools, as this is not available by default on this release (sudo apt-get install python-setuptools)
During Glances installation procedure, it detectereleasedd incorrect version of python-psutil and install it itself.
Then, all looks fine...
... but I get the following error message when launching "glances":
Traceback (most recent call last):
File "/usr/local/bin/glances", line 9, in
load_entry_point('Glances==1.4', 'console_scripts', 'glances')()
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 299, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2229, in load_entry_point
return ep.load()
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1948, in load
entry = import(self.module_name, globals(),globals(), ['name'])
ImportError: No module named glances
I have no experience of Python, so, may be this is very straight forward ?
Thanks,
File "./glances/glances.py", line 2064, in
main()
File "./glances/glances.py", line 2037, in main
screen.update(stats)
File "./glances/glances.py", line 1058, in update
self.flush(stats)
File "./glances/glances.py", line 1054, in flush
self.display(stats)
File "./glances/glances.py", line 1030, in display
self.displayLoad(stats.getLoad(), stats.getCore())
File "./glances/glances.py", line 1152, in displayLoad
"{:.2f}".format(load['min1']), 8)
ValueError: zero length field name in format
Most BSD systems do not have python installed in /usr/bin (generally in /usr/ports or /usr/pkgsrc). Do not hardcode the path, find it during configure (which it does anyway) and "patch" the .py. Or use « #! /usr/bin/env python » but even that is error prone.
Upload Glances to pypi will make easier to install it via Virtualenv or buildout solutions.
just a wish ! could you integrate the cpu temperature ??
After running autogen and make install and then running the application, I was provided with an error message telling me that python-statgrab wasn't installed.
Traceback (most recent call last): File "/usr/local/bin/glances.py", line 28, in <module> import statgrab ImportError: No module named statgrab
Not a huge deal for me as a Python programmer, but if you're not then maybe it could be a bit confusing.
Still, as far as I'm aware ./configure should realise that it's not installed and then fail.
eth1: 0b 0b Cpu %^ Size MB Res MB Name
tun0: 0b 0b 86.0 0 0 migration/4
virbr0: 0b 0b 81.5 0 0 migration/6
but migration does not consume cpu as seen with top
20 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/5
thanks
When you glance at glances now, you see the red in the legend, which is an alert colour, perhaps legend can be disabled per default, or move the legend into the "h" help screen, and replace it with an "press h for help" message.
This will make interpreting the glance easier, as long its green it's good
It would be useful to have a reminder of available key 'c', 'd', 'f', 'm', 'n' , 'q' and their function.
Both with glances --help
or by typing '?' or 'h' once glances is running
11:31 root@XXXXXXXXXX ~ # glances.py
Textmode GUI initialization failed, Glances cannot start.
zsh: exit 1 glances.py
11:35 root@XXXXXXXXX ~ #
11:35 root@XXXXXXX ~ #
J'ai du installer Python 2.6 et python-statgrab à la main a partir des sources car je suis sur Debian 5
Merci d'avance,
NourSs
I just have compiled glances with Cython:
https://github.com/metal3d/glances/tree/cython
look at
src/c directory (in cython branh)
Benchmarking give 30% faster to open, memory has got low usage. I can now specify C types to set better performances.
If you're interessed...
"Pour concurrencer atop -A
, il manque un tri pour les io par process. C'est un des meilleurs indicateurs que je connaisse pour indiquer ce qui charge un système." from Tobu
On Gentoo I don't see the process list, only « Compute data... ».
Linux 64bit Gentoo Base System 2.0.3
Glances v4.1b
psutil 0.4.0
python 2.7.2
Mountpoints other than / are usually in /Volumes, and the space allotted for the display of these paths is too small; in the simplest case perhaps the leading "/Volumes/" could be omitted so that the name shown is (normally) the volume name?
In the experimental branch.
And they are not identical by a… blank line ;-)
diff README.md README
11a12
Traceback (most recent call last):
File "/usr/local/bin/glances", line 9, in
load_entry_point('Glances==1.4', 'console_scripts', 'glances')()
File "/usr/local/lib/python2.7/dist-packages/Glances-1.4-py2.7.egg/glances/glances.py", line 2037, in main
screen.update(stats)
File "/usr/local/lib/python2.7/dist-packages/Glances-1.4-py2.7.egg/glances/glances.py", line 1058, in update
self.flush(stats)
File "/usr/local/lib/python2.7/dist-packages/Glances-1.4-py2.7.egg/glances/glances.py", line 1054, in flush
self.display(stats)
File "/usr/local/lib/python2.7/dist-packages/Glances-1.4-py2.7.egg/glances/glances.py", line 1028, in display
self.displaySystem(stats.getHost(), stats.getSystem())
File "/usr/local/lib/python2.7/dist-packages/Glances-1.4-py2.7.egg/glances/glances.py", line 1089, in displaySystem
system_msg, 80, curses.A_UNDERLINE)
_curses.error: addnstr() returned ERR
econcept@mail:$ tar -xzf glances-1.1.3.tar.gz$ cd glances-1.1.3/
econcept@mail:
econcept@mail:/glances-1.1.3$ lsb_release/glances-1.1.3$ lsb_release -a
No LSB modules are available.
econcept@mail:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
econcept@mail:/glances-1.1.3$ ./configure/glances-1.1.3$ make
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for a Python interpreter with version >= 2.6... python
checking for python... /usr/bin/python
checking for python version... 2.6
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.6/dist-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.6/dist-packages
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
econcept@mail:
make all-recursive
make[1]: entrant dans le répertoire « /home/econcept/glances-1.1.3 »
Making all in src
make[2]: entrant dans le répertoire « /home/econcept/glances-1.1.3/src »
make[2]: Rien à faire pour « all ».
make[2]: quittant le répertoire « /home/econcept/glances-1.1.3/src »
make[2]: entrant dans le répertoire « /home/econcept/glances-1.1.3 »
make[2]: Rien à faire pour « all-am ».
make[2]: quittant le répertoire « /home/econcept/glances-1.1.3 »
make[1]: quittant le répertoire « /home/econcept/glances-1.1.3 »
econcept@mail:/glances-1.1.3$ sudo make install/glances-1.1.3$ sudo apt-get install python-statgrab
[sudo] password for econcept:
Making install in src
make[1]: entrant dans le répertoire « /home/econcept/glances-1.1.3/src »
make[2]: entrant dans le répertoire « /home/econcept/glances-1.1.3/src »
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
/usr/bin/install -c glances.py '/usr/local/bin'
test -z "/usr/local/lib/python2.6/dist-packages/glances" || /bin/mkdir -p "/usr/local/lib/python2.6/dist-packages/glances"
/usr/bin/install -c -m 644 glances.py '/usr/local/lib/python2.6/dist-packages/glances'
Byte-compiling python modules...
glances.py
Byte-compiling python modules (optimized versions) ...
glances.py
make[2]: quittant le répertoire « /home/econcept/glances-1.1.3/src »
make[1]: quittant le répertoire « /home/econcept/glances-1.1.3/src »
make[1]: entrant dans le répertoire « /home/econcept/glances-1.1.3 »
make[2]: entrant dans le répertoire « /home/econcept/glances-1.1.3 »
make[2]: Rien à faire pour « install-exec-am ».
test -z "/usr/local/doc/glances" || /bin/mkdir -p "/usr/local/doc/glances"
/usr/bin/install -c -m 644 README COPYING AUTHORS ChangeLog INSTALL NEWS '/usr/local/doc/glances'
make[2]: quittant le répertoire « /home/econcept/glances-1.1.3 »
make[1]: quittant le répertoire « /home/econcept/glances-1.1.3 »
econcept@mail:
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
python-statgrab est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 3 non mis à jour.
econcept@mail:/glances-1.1.3$ sudo apt-get install python-statgrab/glances-1.1.3$ cd ..
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
python-statgrab est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 3 non mis à jour.
econcept@mail:
econcept@mail:$ glances.py$
7fa5d00b0000-7fa5d02af000 ---p 00168000 08:01 781910 /lib/libcrypto.so.0.9.8
7fa5d02af000-7fa5d02bc000 r--p 00167000 08:01 781910 /lib/libcrypto.so.0.9.8
7fa5d02bc000-7fa5d02d4000 rw-p 00174000 08:01 781910 /lib/libcrypto.so.0.9.8
7fa5d02d4000-7fa5d02d8000 rw-p 00000000 00:00 0
7fa5d02d8000-7fa5d0323000 r-xp 00000000 08:01 781911 /lib/libssl.so.0.9.8
7fa5d0323000-7fa5d0522000 ---p 0004b000 08:01 781911 /lib/libssl.so.0.9.8
7fa5d0522000-7fa5d0524000 r--p 0004a000 08:01 781911 /lib/libssl.so.0.9.8
7fa5d0524000-7fa5d0529000 rw-p 0004c000 08:01 781911 /lib/libssl.so.0.9.8
7fa5d0529000-7fa5d052a000 rw-p 00000000 00:00 0
7fa5d052a000-7fa5d052c000 r-xp 00000000 08:01 781865 /lib/libutil-2.11.1.so
7fa5d052c000-7fa5d072b000 ---p 00002000 08:01 781865 /lib/libutil-2.11.1.so
7fa5d072b000-7fa5d072c000 r--p 00001000 08:01 781865 /lib/libutil-2.11.1.so
7fa5d072c000-7fa5d072d000 rw-p 00002000 08:01 781865 /lib/libutil-2.11.1.so
7fa5d072d000-7fa5d072f000 r-xp 00000000 08:01 781849 /lib/libdl-2.11.1.so
7fa5d072f000-7fa5d092f000 ---p 00002000 08:01 781849 /lib/libdl-2.11.1.so
7fa5d092f000-7fa5d0930000 r--p 00002000 08:01 781849 /lib/libdl-2.11.1.so
7fa5d0930000-7fa5d0931000 rw-p 00003000 08:01 781849 /lib/libdl-2.11.1.so
7fa5d0931000-7fa5d0949000 r-xp 00000000 08:01 781860 /lib/libpthread-2.11.1.so
7fa5d0949000-7fa5d0b48000 ---p 00018000 08:01 781860 /lib/libpthread-2.11.1.so
7fa5d0b48000-7fa5d0b49000 r--p 00017000 08:01 781860 /lib/libpthread-2.11.1.so
7fa5d0b49000-7fa5d0b4a000 rw-p 00018000 08:01 781860 /lib/libpthread-2.11.1.so
7fa5d0b4a000-7fa5d0b4e000 rw-p 00000000 00:00 0
7fa5d0b4e000-7fa5d0b6e000 r-xp 00000000 08:01 781840 /lib/ld-2.11.1.so
7fa5d0c27000-7fa5d0c2e000 r--s 00000000 08:01 132955 /usr/lib/gconv/gconv-modules.cache
7fa5d0c2e000-7fa5d0c6d000 r--p 00000000 08:01 138675 /usr/lib/locale/fr_FR.utf8/LC_CTYPE
7fa5d0c6d000-7fa5d0cdf000 rw-p 00000000 00:00 0
7fa5d0ce0000-7fa5d0d67000 rw-p 00000000 00:00 0
7fa5d0d6b000-7fa5d0d6d000 rw-p 00000000 00:00 0
7fa5d0d6d000-7fa5d0d6e000 r--p 0001f000 08:01 781840 /lib/ld-2.11.1.so
7fa5d0d6e000-7fa5d0d6f000 rw-p 00020000 08:01 781840 /lib/ld-2.11.1.so
7fa5d0d6f000-7fa5d0d70000 rw-p 00000000 00:00 0
7fff2c568000-7fff2c581000 rw-p 00000000 00:00 0 [stack]
7fff2c5ff000-7fff2c600000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Abandon
econcept@mail:
Dear Glances-Team,
I've just installed glances as:
pip install glances
Downloading/unpacking glances
Downloading glances-1.4.tar.gz (830Kb): 830Kb downloaded
Running setup.py egg_info for package glances
warning: no files found matching 'ChangeLog'
Downloading/unpacking psutil>=0.4.1 (from glances)
Downloading psutil-0.6.1.tar.gz (138Kb): 138Kb downloaded
Running setup.py egg_info for package psutil
Installing collected packages: glances, psutil
Running setup.py install for glances
warning: no files found matching 'ChangeLog'
Installing glances script to /usr/local/bin
Running setup.py install for psutil
building '_psutil_linux' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o -o build/lib.linux-x86_64-2.7/_psutil_linux.so
building '_psutil_posix' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o -o build/lib.linux-x86_64-2.7/_psutil_posix.so
Successfully installed glances psutil
Cleaning up...
But then trying to use glances from the CLI gives me:
glances
Traceback (most recent call last):
File "/usr/local/bin/glances", line 9, in
load_entry_point('Glances==1.4', 'console_scripts', 'glances')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2278, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'glances') not found
Regards,
francis
Merci d'avoir combler ce vide dans les stats système !
Après le make install glances.py m'affiche dans la console :
Salut,
Je viens d'installer glances sous OpenBSD 4.9. J'ai une erreur et je n'arrive pas à faire démarrer
Traceback (most recent call last):
File "/usr/local/bin/glances.py", line 914, in
main()
File "/usr/local/bin/glances.py", line 890, in main
init()
File "/usr/local/bin/glances.py", line 882, in init
stats = glancesStats()
File "/usr/local/bin/glances.py", line 134, in init
self.glancesgrabfs = glancesGrabFs()
File "/usr/local/bin/glances.py", line 66, in init
self.update()
File "/usr/local/bin/glances.py", line 82, in update
mtab = open("/etc/mtab", "r")
IOError: [Errno 2] No such file or directory: '/etc/mtab'
Il n'y a pas de fichier mtab sur openbsd. J'ai essayer en utilisant fstab mais dans ce cas, j'ai l'erreur suivante :
Traceback (most recent call last):
File "/usr/local/bin/glances.py", line 914, in
main()
File "/usr/local/bin/glances.py", line 890, in main
init()
File "/usr/local/bin/glances.py", line 885, in init
screen = glancesScreen(refresh_time)
File "/usr/local/bin/glances.py", line 312, in init
curses.noecho() ; curses.cbreak() ; curses.curs_set(0)
_curses.error: curs_set() returned ERR
#
Une idée ?
Note pour les utilisateurs openbsd : il faut installer py-statgrab comme expliqué dans la doc, en téléchargeant le package. Attention, il faut d'abord installer : libstagrab : pkg_add -i libstatgrab
I add the FreebSD support, just add two imports and change in glancesGrabFs.update() (tested in FreeBSD 9.0-RC3) :
Imports to add :
import platform
import subprocess
glancesGrabFs.update() to change :
def __update__(self):
"""
Update the stats
"""
# Reset the list
self.fs_list = []
# Ignore the following fs
ignore_fsname = ('none', 'gvfs-fuse-daemon', 'fusectl', 'cgroup')
ignore_fstype = ('binfmt_misc', 'devpts', 'iso9660', 'none', 'proc', 'sysfs', 'usbfs')
# Open the current mounted FS
if platform.system() == "FreeBSD":
# Get 'mout -p' output, replace tabs by space, split for each line, remove last empty line
mtab = subprocess.check_output('mount -p', shell=True).replace('\t', ' ').split('\n')
mtab.remove('')
elif platform.system() == "Linux":
mtab = open("/etc/mtab", "r").readlines()
for line in mtab:
if line.split()[0] in ignore_fsname: continue
if line.split()[2] in ignore_fstype: continue
# Get FS stats
fs_current = {}
fs_name = self.__getmount__(line.split()[1])
fs_stats = os.statvfs(fs_name)
# Build the list
fs_current['device_name'] = str(line.split()[0])
fs_current['fs_type'] = str(line.split()[2])
fs_current['mnt_point'] = str(fs_name)
fs_current['size'] = float(fs_stats.f_blocks) * long(fs_stats.f_frsize)
fs_current['used'] = float(fs_stats.f_blocks - fs_stats.f_bfree) * long(fs_stats.f_frsize)
fs_current['avail'] = float(fs_stats.f_bfree) * long(fs_stats.f_frsize)
self.fs_list.append(fs_current)
if platform.system() == "Linux":
mtab.close()
ps : dependencies installation in FreeBSD :
pkg_add -r libstatgrab py27-statgrab
Salut,
Un bug au lancement sur une machine décrite dans le titre :
Traceback (most recent call last):
File "/usr/local/bin/glances.py", line 704, in
main()
File "/usr/local/bin/glances.py", line 680, in main
init()
File "/usr/local/bin/glances.py", line 672, in init
stats = glancesStats()
File "/usr/local/bin/glances.py", line 130, in init
self.update()
File "/usr/local/bin/glances.py", line 146, in update
self.diskio = statgrab.sg_get_disk_io_stats_diff()
File "/usr/lib/pymodules/python2.7/statgrab.py", line 66, in sg_get_disk_io_stats_diff
return _statgrab.py_sg_get_disk_io_stats_diff()
File "_statgrab.pyx", line 507, in _statgrab.py_sg_get_disk_io_stats_diff
_statgrab.StatgrabException: 'sg_get_disk_io_stats_diff() returned NULL'
J'ai bien installé python-statgrab avant.
@+
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.