Comments (17)
Thx for the feedback. What is your PsUtil version ?
To get the version:
python
import psutil
psutil.version
from glances.
I edited the first post.
from glances.
Do you have the same issue if you run Glances as root ?
sudo ~/tmp/glances.py
from glances.
Yes, it is still computing.
from glances.
Can you try with the version 0.4.1 of PsUtil ?
from glances.
Hem … you have to know, on Gentoo :
- psutil 0.3.0 is the stable version
- psutil 0.4.0 is in testing
- there is no psutil 0.4.1
- the only available version of pip is the 1.0.2, and is in testing
- and finaly, pip doesn't want to compile on my pc …
from glances.
I have tested with virtualenv (who provides pip, who provides psutil 0.4.1), and … not better.
from glances.
Thx for the PsUtil status on Gentto. I will have a look on the Glances code to check if i can switch to the 0.3.0 version of Glances (the disk IO and network stats are only available in the 0.4.0 or higher version).
Concerning your bug, can you try the following commands:
python
import psutil
for p in psutil.process_iter(): print p
...
Process list...
from glances.
This code works, I see the process list.
from glances.
And this one ?
python
import psutil
for p in psutil.process_iter():
... try:
... print p.name+" "+str(p.get_cpu_percent(interval=0))+" "+str(p.get_io_counters().read_bytes)
... except:
... pass
...
Thx again :)
from glances.
Doesn't print anything.
from glances.
The problem seems to be in the PsUtil get_cpu_percent or get_io_counters().read_bytes method. In the PSUtil's documentation, it should work in the 0.4.0 version...
Can you try to split the code like this:
python
import psutil
for p in psutil.process_iter():
... try:
... print p.name+" "+str(p.get_cpu_percent(interval=0))
... except:
... pass
...
and
python
import psutil
for p in psutil.process_iter():
... try:
... print p.name+" "+str(p.get_io_counters().read_bytes)
... except:
... pass
...
from glances.
It's the get_io_counters().read_bytes method.
from glances.
Ok thanks, i am going to remove the code from Glances because this stat is not used in the current Glances version...
from glances.
I just commit a new beta release (Glance 1.4b2), can you try if the patch solve the issue ?
Just upload the new version here: https://raw.github.com/nicolargo/glances/experimental/src/glances.py
from glances.
Great ! It works fine, thanks.
from glances.
Thx to you !
from glances.
Related Issues (20)
- Aliases not working on Web Interface for shortened values HOT 1
- Possible to sort or scroll the disk I/O column? HOT 3
- New logo for Glances version 4.0 HOT 1
- Lot's of log messages when a proxy is used with the Podman plugin HOT 2
- QuickLook plugin - Add physical core number HOT 1
- RAID plugin not showing up in Glances web UI (Docker install) HOT 2
- Union filesystem (mergerfs) read as individual drives HOT 1
- OpenBSD crash on start without a swap file/partition HOT 2
- Allow containers columns to be selected in config file
- glances: command not found
- Windows Install Issues HOT 3
- Change Renovate config HOT 1
- Add documentation for contributors
- [IP plugin] Make the public ip information more configurable (not only from the Censys service) HOT 1
- Newline in container command corrupts display / hides container HOT 1
- The cpulist of the percpu parameter cannot be fully displayed due to too many cores. HOT 7
- Alpine Docker image build error on ARM HOT 4
- 【macOS] Using Glances to obtain the cpu utilization of a specified process in macOS is inaccurate HOT 1
- Python3 related issues installing glances on Ubuntu 24.04 HOT 1
- V3.6.1.2 Docker Hub Image HOT 1
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.