This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author giampaolo.rodola
Recipients ammar2, giampaolo.rodola, jkloth, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2018-07-24.18:39:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1532457550.87.0.56676864532.issue34060@psf.upfronthosting.co.za>
In-reply-to
Content
> PR 8287 seems short to me and it seems like psutils doesn't expose Processor Queue Length, so I'm not sure why we are talking about depending on psutils?

I'm not sure if you're strictly interested in getting system load or if CPU utilization is also fine. FWIW with psutil you would be able to get the system-wide CPU utilization occurred in a given period of time:

>>> import psutil, time
>>> psutil.cpu_percent(interval=None)  # non-blocking
0.0
>>> time.sleep(60)
>>> psutil.cpu_percent(interval=None)  # average of the last 60 secs
23.6
>>>

...and you can do the same for the current process too (psutil.Process().cpu_percent()).
History
Date User Action Args
2018-07-24 18:39:11giampaolo.rodolasetrecipients: + giampaolo.rodola, paul.moore, vstinner, tim.golden, jkloth, zach.ware, steve.dower, ammar2
2018-07-24 18:39:10giampaolo.rodolasetmessageid: <1532457550.87.0.56676864532.issue34060@psf.upfronthosting.co.za>
2018-07-24 18:39:10giampaolo.rodolalinkissue34060 messages
2018-07-24 18:39:10giampaolo.rodolacreate