forked from giampaolo/psutil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove linux import-time dependency on /proc/stat
The very excellent work that went in under giampaolo#558 gave us a psutil that can be used on systems with a moved /proc. However, on some systems (e.g. test harnesses, containers) may not have any files mounted at /proc at all. In these cases, psutil fails at import time with an IOError trying to access /proc/stat. This patch removes the import-time dependency on a live procfs mounted at /proc, and validates the behavior of some of the details we were hoping to read at import time (i.e. cpu % stats).
- Loading branch information
1 parent
a05dccb
commit 8c1735a
Showing
3 changed files
with
104 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters