Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_cpu_percent sometimes gives result more than 100 #131

Closed
giampaolo opened this issue May 23, 2014 · 2 comments
Closed

get_cpu_percent sometimes gives result more than 100 #131

giampaolo opened this issue May 23, 2014 · 2 comments

Comments

@giampaolo
Copy link
Owner

From woos...@gmail.com on November 08, 2010 13:38:06

What steps will reproduce the problem?  
1. Monitor for resources usage using following code:
      #have it in __init__ of my class
        self.timer = LoopingCall(self.do_monitor)
        def cb(success):
            print 'callback'
        def err(failure):
            print 'errback'
            print failure
        d = self.timer.start(INTERVAL)
        d.addCallback(cb)
        d.addErrback(err)

    #do_monitor just calls 
    cpu_usage = round(proc.get_cpu_percent(),1)
    #and then i do write it into database
2.   in separate console, run on the same machine where you run the code tar 
-czvf blabla.tar.gz /some/folder/with/alot/of/files
3.   check the results, you can monitor gzip or just system usage, gzip giving 
anomal values for sure - like +13380 % of system usage
I'm having INTERVAL set to 5 

What is the expected output?  


What do you see instead?  
100 as max value, values like 13380 or 913 instead sometimes 

What version of psutil are you using? What Python version?  
psutil, ubuntu package, providdes 0.1.2-2, python 2.6.5 

On what operating system? Is it 32bit or 64bit version?  
Ubuntu 10.4 64bit

Original issue: http://code.google.com/p/psutil/issues/detail?id=131

@giampaolo
Copy link
Owner Author

From g.rodola on November 08, 2010 12:57:00

This should have been fixed in commits tracked in issue 123 , available in 
current trunk (upcoming 0.2.0 version).
I also recommend using a more recent psutil version, which is 0.1.3 or current 
trunk wich should be stable enough.
0.1.2 is too old.

Status: Duplicate
Mergedinto: 123

@giampaolo
Copy link
Owner Author

From woos...@gmail.com on November 08, 2010 14:18:32

updated to the version downloadable from google code - same results. will check 
trunk tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant