Comments (13)
Peux tu essayer de le lancer en root ?
from glances.
Meme chose en root :
root@mybox:/home/user# glances.py
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'
from glances.
Tu as bien la version 0.5 de python-statgrab ?
sudo apt-cache show python-statgrab | grep "Version"
Version: 0.5-0ubuntu2
from glances.
Désolé j'avais pas vu ce message, oui j'ai bien la bonne version :
Version: 0.5-0ubuntu2
from glances.
Peux tu compléter avec les informations suivantes:
Version de python: ___
à l'aide de la commande:
python -v
Version de libstatgrab: ___
à l'aide de la commande:
sudo apt-cache show libstatgrab6 | grep Version
Version de python-statgrab: ___
à l'aide de la commande:
sudo apt-cache show python-statgrab | grep « Version »
from glances.
sudo python -V
Python 2.7.1+
sudo apt-cache show libstatgrab6 | grep Version
Version: 0.17-0ubuntu1
sudo apt-cache show python-statgrab | grep Version
Version: 0.5-0ubuntu2
from glances.
On dirait que sur ton système, la directive diskio de libstatgraph retourne une erreur.
Peux tu me confirmer cela en saisissant les commandes suivantes (je te met ce qu'elles retournent sur mon système):
$ python
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import statgrab
statgrab.sg_init()
True
statgrab.sg_get_disk_io_stats_diff()
[{'read_bytes': 1084668928L, 'write_bytes': 5082865664L, 'disk_name': 'sda', 'systime': 1324456551}]
from glances.
$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import statgrab
statgrab.sg_init()
True
statgrab.sg_get_disk_io_stats_diff()
Traceback (most recent call last):
File "", line 1, in
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'
from glances.
C'est dingue car cela marche sur ma VM en 11.04...
Essaye cela (après je sèche...):
sudo apt-get update
sudo apt-get install pkg-config build-essential autoconf automake python libstatgrab-dev python-all-dev
sudo apt-get remove python-statgrab
wget http://ftp.uk.i-scream.org/sites/ftp.i-scream.org/pub/i-scream/pystatgrab/pystatgrab-0.5.tar.gz
tar zxvf pystatgrab-0.5.tar.gz
cd pystatgrab-0.5/
./setup.py build
sudo ./setup.py install
from glances.
Hummmm, tjours pareil.
J'ai l'impression que c'est space sur cette machine, c'est un vps xen :
apt etc.... puis :
/pystatgrab-0.5$ ./setup.py build/pystatgrab-0.5$ sudo ./setup.py install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying statgrab.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_statgrab' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c _statgrab.c -o build/temp.linux-x86_64-2.7/_statgrab.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.7/_statgrab.o -o build/lib.linux-x86_64-2.7/_statgrab.so -lstatgrab
user@mybox:
running install
running build
running build_py
running build_ext
running install_lib
copying build/lib.linux-x86_64-2.7/_statgrab.so -> /usr/local/lib/python2.7/dist-packages
copying build/lib.linux-x86_64-2.7/statgrab.py -> /usr/local/lib/python2.7/dist-packages
byte-compiling /usr/local/lib/python2.7/dist-packages/statgrab.py to statgrab.pyc
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/pystatgrab-0.5.egg-info
user@mybox:~/pystatgrab-0.5$ sudo glances.py
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/local/lib/python2.7/dist-packages/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
raise StatgrabException, 'sg_get_disk_io_stats_diff() returned NULL'
_statgrab.StatgrabException: 'sg_get_disk_io_stats_diff() returned NULL'
from glances.
Le problème semble donc venir de la librairie libstatgrab...
La directive sg_get_disk_io_stats_diff() va lire les informations dans le fichier /proc/diskstats. Peux tu me faire un copier coller ?
Dans tous les cas, je pense qu'il faut remonter le pb au niveau du développeur de libstatgrab: http://freecode.com/projects/libstatgrab
cat /proc/diskstats
...
8 0 sda 57520 17388 2183742 1969448 202721 132037 10177064 6770124 0 1449816 8739420
8 1 sda1 56753 17168 2175850 1963108 190822 127426 10134256 6461008 0 1166724 8423968
8 2 sda2 2 0 12 92 0 0 0 0 0 92 92
8 5 sda5 600 220 6560 5996 740 4611 42808 9304 0 2488 15296
...
from glances.
Ok, tant pis, en tout cas c'est un beau projet, je l'utilise sur des machines plus standard ;)
$ cat /proc/diskstats
1 0 ram0 0 0 0 0 0 0 0 0 0 0 0
1 1 ram1 0 0 0 0 0 0 0 0 0 0 0
1 2 ram2 0 0 0 0 0 0 0 0 0 0 0
1 3 ram3 0 0 0 0 0 0 0 0 0 0 0
1 4 ram4 0 0 0 0 0 0 0 0 0 0 0
1 5 ram5 0 0 0 0 0 0 0 0 0 0 0
1 6 ram6 0 0 0 0 0 0 0 0 0 0 0
1 7 ram7 0 0 0 0 0 0 0 0 0 0 0
1 8 ram8 0 0 0 0 0 0 0 0 0 0 0
1 9 ram9 0 0 0 0 0 0 0 0 0 0 0
1 10 ram10 0 0 0 0 0 0 0 0 0 0 0
1 11 ram11 0 0 0 0 0 0 0 0 0 0 0
1 12 ram12 0 0 0 0 0 0 0 0 0 0 0
1 13 ram13 0 0 0 0 0 0 0 0 0 0 0
1 14 ram14 0 0 0 0 0 0 0 0 0 0 0
1 15 ram15 0 0 0 0 0 0 0 0 0 0 0
7 0 loop0 0 0 0 0 0 0 0 0 0 0 0
7 1 loop1 0 0 0 0 0 0 0 0 0 0 0
7 2 loop2 0 0 0 0 0 0 0 0 0 0 0
7 3 loop3 0 0 0 0 0 0 0 0 0 0 0
7 4 loop4 0 0 0 0 0 0 0 0 0 0 0
7 5 loop5 0 0 0 0 0 0 0 0 0 0 0
7 6 loop6 0 0 0 0 0 0 0 0 0 0 0
7 7 loop7 0 0 0 0 0 0 0 0 0 0 0
202 2 xvda2 34573 711 1536274 855210 517224 171826 5512832 15429280 0 5602260 16284200
202 1 xvda1 70 40 874 1080 22 0 176 320 0 1340 1400
202 3 xvda3 1355360 414851 65533794 65957270 1048440 6848596 63189992 345548820 0 15927560 411518570
from glances.
Ok
from glances.
Related Issues (20)
- Migrate from Makefile to Taskfile
- cant get to cpu temp on any instance of glances.
- pkg_resources.DistributionNotFound: The 'Glances==2.5.1' distribution was not found and is required by the application
- Disable UI if an error occurs and if an export module is enabled HOT 3
- Alert timestamp is incorrect HOT 3
- Encoding issue when running Glances with sudo on CentOS 7
- [fs]not get device_name and percent in action_repeat HOT 5
- TERM setting causes glances to crash HOT 3
- Make the action {{ mustache }} fully compliant standard
- Very high CPU load HOT 12
- Uninstall from easy install HOT 1
- psutil library not found. Glances cannot start. HOT 2
- Refactor Events (/alarms) datamodel.
- The log is spammed with appamor denied messages HOT 8
- Remove log messages from Podman HOT 1
- Rest API version should be change from 3 to 4 HOT 1
- Plugin - Hello World HOT 1
- Please add a startup flag to select an alternate web server static file path
- Randomly stops working. E.g. the process does not exits but trying to visit the page will not load HOT 2
- Docker containers stopped showing with error HTTPConnection.request() got an unexpected keyword argument 'chunked' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glances.