1 /* 2 * Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. 3 * Use of this source code is governed by a BSD-style license that can be 4 * found in the LICENSE file. 5 */ 6 7 #include <Python.h> 8 9 typedef struct kinfo_proc kinfo_proc; 10 11 int psutil_get_proc_list(struct kinfo_proc **procList, size_t *procCount); 12 int psutil_kinfo_proc(const pid_t pid, struct kinfo_proc *proc); 13 14 // 15 PyObject* psutil_cpu_count_phys(PyObject* self, PyObject* args); 16 PyObject* psutil_disk_io_counters(PyObject* self, PyObject* args); 17 PyObject* psutil_get_cmdline(long pid); 18 PyObject* psutil_per_cpu_times(PyObject* self, PyObject* args); 19 PyObject* psutil_proc_cpu_affinity_get(PyObject* self, PyObject* args); 20 PyObject* psutil_proc_cpu_affinity_set(PyObject* self, PyObject* args); 21 PyObject* psutil_proc_cwd(PyObject* self, PyObject* args); 22 PyObject* psutil_proc_exe(PyObject* self, PyObject* args); 23 PyObject* psutil_proc_memory_maps(PyObject* self, PyObject* args); 24 PyObject* psutil_proc_num_fds(PyObject* self, PyObject* args); 25 PyObject* psutil_proc_num_threads(PyObject* self, PyObject* args); 26 PyObject* psutil_proc_threads(PyObject* self, PyObject* args); 27 PyObject* psutil_swap_mem(PyObject* self, PyObject* args); 28 PyObject* psutil_virtual_mem(PyObject* self, PyObject* args); 29 PyObject* psutil_cpu_stats(PyObject* self, PyObject* args); 30 #if defined(PSUTIL_FREEBSD) 31 PyObject* psutil_sensors_battery(PyObject* self, PyObject* args); 32 PyObject* psutil_sensors_cpu_temperature(PyObject* self, PyObject* args); 33 PyObject* psutil_cpu_freq(PyObject* self, PyObject* args); 34 #endif 35