diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2022-01-16 19:06:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 19:06:05 +0100 |
commit | 01f5f1ecb1b3470c1df2a120f0f6dca7f58088fb (patch) | |
tree | b01a1b7f6cba89b7390da49e3edae39d0a439b76 | |
parent | 7803582ae7a331e3a0be367cae377c92f294148d (diff) | |
download | psutil-01f5f1ecb1b3470c1df2a120f0f6dca7f58088fb.tar.gz |
OpenBSD files refactoring (#2056)
-rw-r--r-- | MANIFEST.in | 10 | ||||
-rw-r--r-- | psutil/_psutil_bsd.c | 5 | ||||
-rw-r--r-- | psutil/arch/openbsd/cpu.c | 91 | ||||
-rw-r--r-- | psutil/arch/openbsd/cpu.h | 11 | ||||
-rw-r--r-- | psutil/arch/openbsd/disk.c | 67 | ||||
-rw-r--r-- | psutil/arch/openbsd/disk.h | 10 | ||||
-rw-r--r-- | psutil/arch/openbsd/mem.c | 118 | ||||
-rw-r--r-- | psutil/arch/openbsd/mem.h | 11 | ||||
-rw-r--r-- | psutil/arch/openbsd/proc.c (renamed from psutil/arch/openbsd/specific.c) | 253 | ||||
-rw-r--r-- | psutil/arch/openbsd/proc.h (renamed from psutil/arch/openbsd/specific.h) | 9 | ||||
-rwxr-xr-x | setup.py | 5 |
11 files changed, 326 insertions, 264 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index 4a10365d..5b4eb69a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -61,8 +61,14 @@ include psutil/arch/netbsd/socks.c include psutil/arch/netbsd/socks.h include psutil/arch/netbsd/specific.c include psutil/arch/netbsd/specific.h -include psutil/arch/openbsd/specific.c -include psutil/arch/openbsd/specific.h +include psutil/arch/openbsd/cpu.c +include psutil/arch/openbsd/cpu.h +include psutil/arch/openbsd/disk.c +include psutil/arch/openbsd/disk.h +include psutil/arch/openbsd/mem.c +include psutil/arch/openbsd/mem.h +include psutil/arch/openbsd/proc.c +include psutil/arch/openbsd/proc.h include psutil/arch/osx/cpu.c include psutil/arch/osx/cpu.h include psutil/arch/osx/process_info.c diff --git a/psutil/_psutil_bsd.c b/psutil/_psutil_bsd.c index 873ebbc9..80efe6a6 100644 --- a/psutil/_psutil_bsd.c +++ b/psutil/_psutil_bsd.c @@ -77,7 +77,10 @@ #include <utmpx.h> #endif #elif PSUTIL_OPENBSD - #include "arch/openbsd/specific.h" + #include "arch/openbsd/cpu.h" + #include "arch/openbsd/disk.h" + #include "arch/openbsd/mem.h" + #include "arch/openbsd/proc.h" #include <utmp.h> #include <sys/vnode.h> // for VREG diff --git a/psutil/arch/openbsd/cpu.c b/psutil/arch/openbsd/cpu.c new file mode 100644 index 00000000..2a366fe0 --- /dev/null +++ b/psutil/arch/openbsd/cpu.c @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2009, Giampaolo Rodola', Landry Breuil. + * All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <Python.h> +#include <sys/sysctl.h> +#include <sys/sched.h> // for CPUSTATES & CP_* + + +PyObject * +psutil_per_cpu_times(PyObject *self, PyObject *args) { + int mib[3]; + int ncpu; + size_t len; + size_t size; + int i; + PyObject *py_retlist = PyList_New(0); + PyObject *py_cputime = NULL; + + if (py_retlist == NULL) + return NULL; + + // retrieve the number of cpus + mib[0] = CTL_HW; + mib[1] = HW_NCPU; + len = sizeof(ncpu); + if (sysctl(mib, 2, &ncpu, &len, NULL, 0) == -1) { + PyErr_SetFromErrno(PyExc_OSError); + goto error; + } + uint64_t cpu_time[CPUSTATES]; + + for (i = 0; i < ncpu; i++) { + mib[0] = CTL_KERN; + mib[1] = KERN_CPTIME2; + mib[2] = i; + size = sizeof(cpu_time); + if (sysctl(mib, 3, &cpu_time, &size, NULL, 0) == -1) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + + py_cputime = Py_BuildValue( + "(ddddd)", + (double)cpu_time[CP_USER] / CLOCKS_PER_SEC, + (double)cpu_time[CP_NICE] / CLOCKS_PER_SEC, + (double)cpu_time[CP_SYS] / CLOCKS_PER_SEC, + (double)cpu_time[CP_IDLE] / CLOCKS_PER_SEC, + (double)cpu_time[CP_INTR] / CLOCKS_PER_SEC); + if (!py_cputime) + goto error; + if (PyList_Append(py_retlist, py_cputime)) + goto error; + Py_DECREF(py_cputime); + } + + return py_retlist; + +error: + Py_XDECREF(py_cputime); + Py_DECREF(py_retlist); + return NULL; +} + + +PyObject * +psutil_cpu_stats(PyObject *self, PyObject *args) { + size_t size; + struct uvmexp uv; + int uvmexp_mib[] = {CTL_VM, VM_UVMEXP}; + + size = sizeof(uv); + if (sysctl(uvmexp_mib, 2, &uv, &size, NULL, 0) < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + + return Py_BuildValue( + "IIIIIII", + uv.swtch, // ctx switches + uv.intrs, // interrupts - XXX always 0, will be determined via /proc + uv.softs, // soft interrupts + uv.syscalls, // syscalls - XXX always 0 + uv.traps, // traps + uv.faults, // faults + uv.forks // forks + ); +} diff --git a/psutil/arch/openbsd/cpu.h b/psutil/arch/openbsd/cpu.h new file mode 100644 index 00000000..6bace0b1 --- /dev/null +++ b/psutil/arch/openbsd/cpu.h @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2009, Giampaolo Rodola', Landry Breuil. + * All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <Python.h> + +PyObject *psutil_cpu_stats(PyObject* self, PyObject* args); +PyObject *psutil_per_cpu_times(PyObject *self, PyObject *args); diff --git a/psutil/arch/openbsd/disk.c b/psutil/arch/openbsd/disk.c new file mode 100644 index 00000000..e533a082 --- /dev/null +++ b/psutil/arch/openbsd/disk.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2009, Giampaolo Rodola', Landry Breuil. + * All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <Python.h> +#include <sys/sysctl.h> +#include <sys/disk.h> + + +PyObject * +psutil_disk_io_counters(PyObject *self, PyObject *args) { + int i, dk_ndrive, mib[3]; + size_t len; + struct diskstats *stats = NULL; + + PyObject *py_retdict = PyDict_New(); + PyObject *py_disk_info = NULL; + if (py_retdict == NULL) + return NULL; + + mib[0] = CTL_HW; + mib[1] = HW_DISKSTATS; + len = 0; + if (sysctl(mib, 2, NULL, &len, NULL, 0) < 0) { + PyErr_SetFromErrno(PyExc_OSError); + goto error; + } + dk_ndrive = (int)(len / sizeof(struct diskstats)); + + stats = malloc(len); + if (stats == NULL) { + PyErr_NoMemory(); + goto error; + } + if (sysctl(mib, 2, stats, &len, NULL, 0) < 0 ) { + PyErr_SetFromErrno(PyExc_OSError); + goto error; + } + + for (i = 0; i < dk_ndrive; i++) { + py_disk_info = Py_BuildValue( + "(KKKK)", + stats[i].ds_rxfer, // num reads + stats[i].ds_wxfer, // num writes + stats[i].ds_rbytes, // read bytes + stats[i].ds_wbytes // write bytes + ); + if (!py_disk_info) + goto error; + if (PyDict_SetItemString(py_retdict, stats[i].ds_name, py_disk_info)) + goto error; + Py_DECREF(py_disk_info); + } + + free(stats); + return py_retdict; + +error: + Py_XDECREF(py_disk_info); + Py_DECREF(py_retdict); + if (stats != NULL) + free(stats); + return NULL; +} diff --git a/psutil/arch/openbsd/disk.h b/psutil/arch/openbsd/disk.h new file mode 100644 index 00000000..b6348dd3 --- /dev/null +++ b/psutil/arch/openbsd/disk.h @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2009, Giampaolo Rodola', Landry Breuil. + * All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <Python.h> + +PyObject *psutil_disk_io_counters(PyObject* self, PyObject* args); diff --git a/psutil/arch/openbsd/mem.c b/psutil/arch/openbsd/mem.c new file mode 100644 index 00000000..c6cab618 --- /dev/null +++ b/psutil/arch/openbsd/mem.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2009, Giampaolo Rodola', Landry Breuil. + * All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <Python.h> +#include <sys/sysctl.h> +#include <sys/vmmeter.h> +#include <sys/mount.h> +#include <sys/swap.h> +#include <sys/param.h> + +#include "../../_psutil_posix.h" + + +PyObject * +psutil_virtual_mem(PyObject *self, PyObject *args) { + int64_t total_physmem; + int uvmexp_mib[] = {CTL_VM, VM_UVMEXP}; + int bcstats_mib[] = {CTL_VFS, VFS_GENERIC, VFS_BCACHESTAT}; + int physmem_mib[] = {CTL_HW, HW_PHYSMEM64}; + int vmmeter_mib[] = {CTL_VM, VM_METER}; + size_t size; + struct uvmexp uvmexp; + struct bcachestats bcstats; + struct vmtotal vmdata; + long pagesize = psutil_getpagesize(); + + size = sizeof(total_physmem); + if (sysctl(physmem_mib, 2, &total_physmem, &size, NULL, 0) < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + + size = sizeof(uvmexp); + if (sysctl(uvmexp_mib, 2, &uvmexp, &size, NULL, 0) < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + + size = sizeof(bcstats); + if (sysctl(bcstats_mib, 3, &bcstats, &size, NULL, 0) < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + + size = sizeof(vmdata); + if (sysctl(vmmeter_mib, 2, &vmdata, &size, NULL, 0) < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + + return Py_BuildValue("KKKKKKKK", + // Note: many programs calculate total memory as + // "uvmexp.npages * pagesize" but this is incorrect and does not + // match "sysctl | grep hw.physmem". + (unsigned long long) total_physmem, + (unsigned long long) uvmexp.free * pagesize, + (unsigned long long) uvmexp.active * pagesize, + (unsigned long long) uvmexp.inactive * pagesize, + (unsigned long long) uvmexp.wired * pagesize, + // this is how "top" determines it + (unsigned long long) bcstats.numbufpages * pagesize, // cached + (unsigned long long) 0, // buffers + (unsigned long long) vmdata.t_vmshr + vmdata.t_rmshr // shared + ); +} + + +PyObject * +psutil_swap_mem(PyObject *self, PyObject *args) { + uint64_t swap_total, swap_free; + struct swapent *swdev; + int nswap, i; + + if ((nswap = swapctl(SWAP_NSWAP, 0, 0)) == 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + + if ((swdev = calloc(nswap, sizeof(*swdev))) == NULL) { + PyErr_NoMemory(); + return NULL; + } + + if (swapctl(SWAP_STATS, swdev, nswap) == -1) { + PyErr_SetFromErrno(PyExc_OSError); + goto error; + } + + // Total things up. + swap_total = swap_free = 0; + for (i = 0; i < nswap; i++) { + if (swdev[i].se_flags & SWF_ENABLE) { + swap_free += (swdev[i].se_nblks - swdev[i].se_inuse); + swap_total += swdev[i].se_nblks; + } + } + + free(swdev); + return Py_BuildValue( + "(LLLII)", + swap_total * DEV_BSIZE, + (swap_total - swap_free) * DEV_BSIZE, + swap_free * DEV_BSIZE, + // swap in / swap out is not supported as the + // swapent struct does not provide any info + // about it. + 0, + 0 + ); + +error: + free(swdev); + return NULL; +} diff --git a/psutil/arch/openbsd/mem.h b/psutil/arch/openbsd/mem.h new file mode 100644 index 00000000..1de3f3c4 --- /dev/null +++ b/psutil/arch/openbsd/mem.h @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2009, Giampaolo Rodola', Landry Breuil. + * All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <Python.h> + +PyObject *psutil_virtual_mem(PyObject *self, PyObject *args); +PyObject *psutil_swap_mem(PyObject *self, PyObject *args); diff --git a/psutil/arch/openbsd/specific.c b/psutil/arch/openbsd/proc.c index cdd4f623..35acab25 100644 --- a/psutil/arch/openbsd/specific.c +++ b/psutil/arch/openbsd/proc.c @@ -3,8 +3,6 @@ * All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. - * - * Platform-specific module methods for OpenBSD. */ #include <Python.h> @@ -19,21 +17,14 @@ #include <sys/sysctl.h> #include <sys/user.h> #include <sys/proc.h> -#include <sys/mount.h> // for VFS_* -#include <sys/swap.h> // for swap_mem -#include <sys/vmmeter.h> // for vmtotal struct #include <signal.h> #include <kvm.h> -// connection stuff #include <netdb.h> // for NI_MAXHOST #include <sys/socket.h> -#include <sys/sched.h> // for CPUSTATES & CP_* #define _KERNEL // for DTYPE_* #include <sys/file.h> #undef _KERNEL -#include <sys/disk.h> // struct diskstats #include <arpa/inet.h> // for inet_ntoa() -#include <err.h> // for warn() & err() #include "../../_psutil_common.h" #include "../../_psutil_posix.h" @@ -287,106 +278,6 @@ error: PyObject * -psutil_virtual_mem(PyObject *self, PyObject *args) { - int64_t total_physmem; - int uvmexp_mib[] = {CTL_VM, VM_UVMEXP}; - int bcstats_mib[] = {CTL_VFS, VFS_GENERIC, VFS_BCACHESTAT}; - int physmem_mib[] = {CTL_HW, HW_PHYSMEM64}; - int vmmeter_mib[] = {CTL_VM, VM_METER}; - size_t size; - struct uvmexp uvmexp; - struct bcachestats bcstats; - struct vmtotal vmdata; - long pagesize = psutil_getpagesize(); - - size = sizeof(total_physmem); - if (sysctl(physmem_mib, 2, &total_physmem, &size, NULL, 0) < 0) { - PyErr_SetFromErrno(PyExc_OSError); - return NULL; - } - - size = sizeof(uvmexp); - if (sysctl(uvmexp_mib, 2, &uvmexp, &size, NULL, 0) < 0) { - PyErr_SetFromErrno(PyExc_OSError); - return NULL; - } - - size = sizeof(bcstats); - if (sysctl(bcstats_mib, 3, &bcstats, &size, NULL, 0) < 0) { - PyErr_SetFromErrno(PyExc_OSError); - return NULL; - } - - size = sizeof(vmdata); - if (sysctl(vmmeter_mib, 2, &vmdata, &size, NULL, 0) < 0) { - PyErr_SetFromErrno(PyExc_OSError); - return NULL; - } - - return Py_BuildValue("KKKKKKKK", - // Note: many programs calculate total memory as - // "uvmexp.npages * pagesize" but this is incorrect and does not - // match "sysctl | grep hw.physmem". - (unsigned long long) total_physmem, - (unsigned long long) uvmexp.free * pagesize, - (unsigned long long) uvmexp.active * pagesize, - (unsigned long long) uvmexp.inactive * pagesize, - (unsigned long long) uvmexp.wired * pagesize, - // this is how "top" determines it - (unsigned long long) bcstats.numbufpages * pagesize, // cached - (unsigned long long) 0, // buffers - (unsigned long long) vmdata.t_vmshr + vmdata.t_rmshr // shared - ); -} - - -PyObject * -psutil_swap_mem(PyObject *self, PyObject *args) { - uint64_t swap_total, swap_free; - struct swapent *swdev; - int nswap, i; - - if ((nswap = swapctl(SWAP_NSWAP, 0, 0)) == 0) { - PyErr_SetFromErrno(PyExc_OSError); - return NULL; - } - - if ((swdev = calloc(nswap, sizeof(*swdev))) == NULL) { - PyErr_NoMemory(); - return NULL; - } - - if (swapctl(SWAP_STATS, swdev, nswap) == -1) { - PyErr_SetFromErrno(PyExc_OSError); - goto error; - } - - // Total things up. - swap_total = swap_free = 0; - for (i = 0; i < nswap; i++) { - if (swdev[i].se_flags & SWF_ENABLE) { - swap_free += (swdev[i].se_nblks - swdev[i].se_inuse); - swap_total += swdev[i].se_nblks; - } - } - - free(swdev); - return Py_BuildValue("(LLLII)", - swap_total * DEV_BSIZE, - (swap_total - swap_free) * DEV_BSIZE, - swap_free * DEV_BSIZE, - // swap in / swap out is not supported as the - // swapent struct does not provide any info - // about it. - 0, 0); - -error: - free(swdev); - return NULL; -} - - -PyObject * psutil_proc_num_fds(PyObject *self, PyObject *args) { pid_t pid; int cnt; @@ -640,147 +531,3 @@ error: free(tcplist); return NULL; } - - -PyObject * -psutil_per_cpu_times(PyObject *self, PyObject *args) { - int mib[3]; - int ncpu; - size_t len; - size_t size; - int i; - PyObject *py_retlist = PyList_New(0); - PyObject *py_cputime = NULL; - - if (py_retlist == NULL) - return NULL; - - - // retrieve the number of cpus - mib[0] = CTL_HW; - mib[1] = HW_NCPU; - len = sizeof(ncpu); - if (sysctl(mib, 2, &ncpu, &len, NULL, 0) == -1) { - PyErr_SetFromErrno(PyExc_OSError); - goto error; - } - uint64_t cpu_time[CPUSTATES]; - - for (i = 0; i < ncpu; i++) { - // per-cpu info - mib[0] = CTL_KERN; - mib[1] = KERN_CPTIME2; - mib[2] = i; - size = sizeof(cpu_time); - if (sysctl(mib, 3, &cpu_time, &size, NULL, 0) == -1) { - warn("failed to get kern.cptime2"); - PyErr_SetFromErrno(PyExc_OSError); - return NULL; - } - - py_cputime = Py_BuildValue( - "(ddddd)", - (double)cpu_time[CP_USER] / CLOCKS_PER_SEC, - (double)cpu_time[CP_NICE] / CLOCKS_PER_SEC, - (double)cpu_time[CP_SYS] / CLOCKS_PER_SEC, - (double)cpu_time[CP_IDLE] / CLOCKS_PER_SEC, - (double)cpu_time[CP_INTR] / CLOCKS_PER_SEC); - if (!py_cputime) - goto error; - if (PyList_Append(py_retlist, py_cputime)) - goto error; - Py_DECREF(py_cputime); - } - - return py_retlist; - -error: - Py_XDECREF(py_cputime); - Py_DECREF(py_retlist); - return NULL; -} - - -PyObject * -psutil_disk_io_counters(PyObject *self, PyObject *args) { - int i, dk_ndrive, mib[3]; - size_t len; - struct diskstats *stats = NULL; - - PyObject *py_retdict = PyDict_New(); - PyObject *py_disk_info = NULL; - if (py_retdict == NULL) - return NULL; - - mib[0] = CTL_HW; - mib[1] = HW_DISKSTATS; - len = 0; - if (sysctl(mib, 2, NULL, &len, NULL, 0) < 0) { - warn("can't get hw.diskstats size"); - PyErr_SetFromErrno(PyExc_OSError); - goto error; - } - dk_ndrive = (int)(len / sizeof(struct diskstats)); - - stats = malloc(len); - if (stats == NULL) { - warn("can't malloc"); - PyErr_NoMemory(); - goto error; - } - if (sysctl(mib, 2, stats, &len, NULL, 0) < 0 ) { - warn("could not read hw.diskstats"); - PyErr_SetFromErrno(PyExc_OSError); - goto error; - } - - for (i = 0; i < dk_ndrive; i++) { - py_disk_info = Py_BuildValue( - "(KKKK)", - stats[i].ds_rxfer, // num reads - stats[i].ds_wxfer, // num writes - stats[i].ds_rbytes, // read bytes - stats[i].ds_wbytes // write bytes - ); - if (!py_disk_info) - goto error; - if (PyDict_SetItemString(py_retdict, stats[i].ds_name, py_disk_info)) - goto error; - Py_DECREF(py_disk_info); - } - - free(stats); - return py_retdict; - -error: - Py_XDECREF(py_disk_info); - Py_DECREF(py_retdict); - if (stats != NULL) - free(stats); - return NULL; -} - - -PyObject * -psutil_cpu_stats(PyObject *self, PyObject *args) { - size_t size; - struct uvmexp uv; - int uvmexp_mib[] = {CTL_VM, VM_UVMEXP}; - - size = sizeof(uv); - if (sysctl(uvmexp_mib, 2, &uv, &size, NULL, 0) < 0) { - PyErr_SetFromErrno(PyExc_OSError); - return NULL; - } - - return Py_BuildValue( - "IIIIIII", - uv.swtch, // ctx switches - uv.intrs, // interrupts - XXX always 0, will be determined via /proc - uv.softs, // soft interrupts - uv.syscalls, // syscalls - XXX always 0 - uv.traps, // traps - uv.faults, // faults - uv.forks // forks - ); -} diff --git a/psutil/arch/openbsd/specific.h b/psutil/arch/openbsd/proc.h index b8170a02..5ca5890d 100644 --- a/psutil/arch/openbsd/specific.h +++ b/psutil/arch/openbsd/proc.h @@ -13,15 +13,10 @@ int psutil_kinfo_proc(pid_t pid, struct kinfo_proc *proc); struct kinfo_file * kinfo_getfile(pid_t pid, int* cnt); int psutil_get_proc_list(struct kinfo_proc **procList, size_t *procCount); char **_psutil_get_argv(pid_t pid); -PyObject * psutil_get_cmdline(pid_t pid); -// +PyObject *psutil_get_cmdline(pid_t pid); PyObject *psutil_proc_threads(PyObject *self, PyObject *args); -PyObject *psutil_virtual_mem(PyObject *self, PyObject *args); -PyObject *psutil_swap_mem(PyObject *self, PyObject *args); PyObject *psutil_proc_num_fds(PyObject *self, PyObject *args); PyObject *psutil_proc_cwd(PyObject *self, PyObject *args); PyObject *psutil_proc_connections(PyObject *self, PyObject *args); -PyObject *psutil_per_cpu_times(PyObject *self, PyObject *args); -PyObject* psutil_disk_io_counters(PyObject* self, PyObject* args); -PyObject* psutil_cpu_stats(PyObject* self, PyObject* args); + @@ -220,7 +220,10 @@ elif OPENBSD: 'psutil._psutil_bsd', sources=sources + [ 'psutil/_psutil_bsd.c', - 'psutil/arch/openbsd/specific.c', + 'psutil/arch/openbsd/cpu.c', + 'psutil/arch/openbsd/disk.c', + 'psutil/arch/openbsd/mem.c', + 'psutil/arch/openbsd/proc.c', ], define_macros=macros, libraries=["kvm"]) |