-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Openbsd support (#562) #615
Conversation
…the FreeBSD ones.
- switch mem/swap to VM_UVMEXP & swapctl - #if 0 out cpu_count_phys - use KERN_CPTIME in cpu_times - provide an empty disk_io_counters implem, needed by tests - disable proc_connections for now
…that info. At best you get an inode or the filesystem the process is running within..
No way to distinguish between read and write times, so assume half spent in both..
Conflicts: psutil/_psbsd.py
This reverts commit ccb461f.
+1 |
I took a look back at this and updated the code here:
DONE:
|
|
Thanks for picking up this, i admit it feel out of the radar since i had no time for it... |
as i already said several times, open_files() will never get implemented, the kernel won't provide such an API. |
But yay for seeing this merged \o/ |
Do you know if this is a kernel bug? We have the same problem on FreeBSD which does provide the necessary API but the path sometimes is empty. Also OpenBSD should provide it ( |
@landryb can you please comment about this? psutil/psutil/arch/bsd/openbsd.c Line 743 in fc1e59d
|
This is not a bug, it's on purpose for 'privacy reasons'. As for The only information you can get is the inode (see http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/fstat.1 from which you can list open inodes for a process), from which you could theoretically do lookups in the filesystem but this is cumbersome.
struct diskstats doesnt provide a breakdown between read and write time i think, see |
As for the open files, the OS providing this information have to keep a cache of fd/inode/path around, and update it if the file is moved/hardlinked/etc - OpenBSD just doesnt do this. |
OpenBSD was the edge case we cared about, it is supported for over a year (giampaolo/psutil#615)
* Remove support for installation without psutil. OpenBSD was the edge case we cared about, it is supported for over a year (giampaolo/psutil#615) * Bump psutil version to when they introduced OpenBSD support
Isnt perfect yet, but would be nice to merge early so that the work isnt lost. Basic functionality needed by end users work...