summaryrefslogtreecommitdiff
path: root/psutil/_psutil_bsd.c
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2022-01-16 21:35:04 +0100
committerGitHub <noreply@github.com>2022-01-16 21:35:04 +0100
commit6173da20bc7e697167e25d672b2d20f5e4b9bc4d (patch)
treed68898e69fed70a19346d3c2f08ea78998d77734 /psutil/_psutil_bsd.c
parent98b49486f81f085bceda60b01b0a8f69a7008290 (diff)
downloadpsutil-6173da20bc7e697167e25d672b2d20f5e4b9bc4d.tar.gz
Remove docstrings from C function definitions (#2058)
Diffstat (limited to 'psutil/_psutil_bsd.c')
-rw-r--r--psutil/_psutil_bsd.c104
1 files changed, 34 insertions, 70 deletions
diff --git a/psutil/_psutil_bsd.c b/psutil/_psutil_bsd.c
index 732a560f..13170838 100644
--- a/psutil/_psutil_bsd.c
+++ b/psutil/_psutil_bsd.c
@@ -1063,93 +1063,57 @@ error:
static PyMethodDef mod_methods[] = {
// --- per-process functions
- {"proc_oneshot_info", psutil_proc_oneshot_info, METH_VARARGS,
- "Return multiple info about a process"},
- {"proc_name", psutil_proc_name, METH_VARARGS,
- "Return process name"},
- {"proc_cmdline", psutil_proc_cmdline, METH_VARARGS,
- "Return process cmdline as a list of cmdline arguments"},
- {"proc_threads", psutil_proc_threads, METH_VARARGS,
- "Return process threads"},
+ {"proc_cmdline", psutil_proc_cmdline, METH_VARARGS},
+ {"proc_name", psutil_proc_name, METH_VARARGS},
+ {"proc_oneshot_info", psutil_proc_oneshot_info, METH_VARARGS},
+ {"proc_threads", psutil_proc_threads, METH_VARARGS},
#if defined(PSUTIL_FREEBSD) || defined(PSUTIL_OPENBSD)
- {"proc_connections", psutil_proc_connections, METH_VARARGS,
- "Return connections opened by process"},
+ {"proc_connections", psutil_proc_connections, METH_VARARGS},
#endif
- {"proc_cwd", psutil_proc_cwd, METH_VARARGS,
- "Return process current working directory."},
+ {"proc_cwd", psutil_proc_cwd, METH_VARARGS},
#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 || PSUTIL_OPENBSD || defined(PSUTIL_NETBSD)
- {"proc_num_fds", psutil_proc_num_fds, METH_VARARGS,
- "Return the number of file descriptors opened by this process"},
- {"proc_open_files", psutil_proc_open_files, METH_VARARGS,
- "Return files opened by process as a list of (path, fd) tuples"},
+ {"proc_num_fds", psutil_proc_num_fds, METH_VARARGS},
+ {"proc_open_files", psutil_proc_open_files, METH_VARARGS},
#endif
#if defined(PSUTIL_FREEBSD) || defined(PSUTIL_NETBSD)
- {"proc_num_threads", psutil_proc_num_threads, METH_VARARGS,
- "Return number of threads used by process"},
+ {"proc_num_threads", psutil_proc_num_threads, METH_VARARGS},
#endif
#if defined(PSUTIL_FREEBSD)
- {"proc_exe", psutil_proc_exe, METH_VARARGS,
- "Return process pathname executable"},
- {"proc_memory_maps", psutil_proc_memory_maps, METH_VARARGS,
- "Return a list of tuples for every process's memory map"},
- {"proc_cpu_affinity_get", psutil_proc_cpu_affinity_get, METH_VARARGS,
- "Return process CPU affinity."},
- {"proc_cpu_affinity_set", psutil_proc_cpu_affinity_set, METH_VARARGS,
- "Set process CPU affinity."},
- {"proc_getrlimit", psutil_proc_getrlimit, METH_VARARGS,
- "Get process resource limits."},
- {"proc_setrlimit", psutil_proc_setrlimit, METH_VARARGS,
- "Set process resource limits."},
- {"cpu_topology", psutil_cpu_topology, METH_VARARGS,
- "Return CPU topology as an XML string."},
+ {"cpu_topology", psutil_cpu_topology, METH_VARARGS},
+ {"proc_cpu_affinity_get", psutil_proc_cpu_affinity_get, METH_VARARGS},
+ {"proc_cpu_affinity_set", psutil_proc_cpu_affinity_set, METH_VARARGS},
+ {"proc_exe", psutil_proc_exe, METH_VARARGS},
+ {"proc_getrlimit", psutil_proc_getrlimit, METH_VARARGS},
+ {"proc_memory_maps", psutil_proc_memory_maps, METH_VARARGS},
+ {"proc_setrlimit", psutil_proc_setrlimit, METH_VARARGS},
#endif
- {"proc_environ", psutil_proc_environ, METH_VARARGS,
- "Return process environment"},
+ {"proc_environ", psutil_proc_environ, METH_VARARGS},
// --- system-related functions
-
- {"pids", psutil_pids, METH_VARARGS,
- "Returns a list of PIDs currently running on the system"},
- {"cpu_count_logical", psutil_cpu_count_logical, METH_VARARGS,
- "Return number of logical CPUs on the system"},
- {"virtual_mem", psutil_virtual_mem, METH_VARARGS,
- "Return system virtual memory usage statistics"},
- {"swap_mem", psutil_swap_mem, METH_VARARGS,
- "Return swap mem stats"},
- {"cpu_times", psutil_cpu_times, METH_VARARGS,
- "Return system cpu times as a tuple (user, system, nice, idle, irc)"},
- {"per_cpu_times", psutil_per_cpu_times, METH_VARARGS,
- "Return system per-cpu times as a list of tuples"},
- {"boot_time", psutil_boot_time, METH_VARARGS,
- "Return the system boot time expressed in seconds since the epoch."},
- {"disk_partitions", psutil_disk_partitions, METH_VARARGS,
- "Return a list of tuples including device, mount point and "
- "fs type for all partitions mounted on the system."},
- {"net_io_counters", psutil_net_io_counters, METH_VARARGS,
- "Return dict of tuples of networks I/O information."},
- {"disk_io_counters", psutil_disk_io_counters, METH_VARARGS,
- "Return a Python dict of tuples for disk I/O information"},
- {"users", psutil_users, METH_VARARGS,
- "Return currently connected users as a list of tuples"},
- {"cpu_stats", psutil_cpu_stats, METH_VARARGS,
- "Return CPU statistics"},
+ {"boot_time", psutil_boot_time, METH_VARARGS},
+ {"cpu_count_logical", psutil_cpu_count_logical, METH_VARARGS},
+ {"cpu_stats", psutil_cpu_stats, METH_VARARGS},
+ {"cpu_times", psutil_cpu_times, METH_VARARGS},
+ {"disk_io_counters", psutil_disk_io_counters, METH_VARARGS},
+ {"disk_partitions", psutil_disk_partitions, METH_VARARGS},
+ {"net_io_counters", psutil_net_io_counters, METH_VARARGS},
+ {"per_cpu_times", psutil_per_cpu_times, METH_VARARGS},
+ {"pids", psutil_pids, METH_VARARGS},
+ {"swap_mem", psutil_swap_mem, METH_VARARGS},
+ {"users", psutil_users, METH_VARARGS},
+ {"virtual_mem", psutil_virtual_mem, METH_VARARGS},
#if defined(PSUTIL_FREEBSD) || defined(PSUTIL_OPENBSD)
- {"cpu_freq", psutil_cpu_freq, METH_VARARGS,
- "Return CPU frequency"},
+ {"cpu_freq", psutil_cpu_freq, METH_VARARGS},
#endif
#if defined(PSUTIL_FREEBSD) || defined(PSUTIL_NETBSD)
- {"net_connections", psutil_net_connections, METH_VARARGS,
- "Return system-wide open connections."},
+ {"net_connections", psutil_net_connections, METH_VARARGS},
#endif
#if defined(PSUTIL_FREEBSD)
- {"sensors_battery", psutil_sensors_battery, METH_VARARGS,
- "Return battery information."},
- {"sensors_cpu_temperature", psutil_sensors_cpu_temperature, METH_VARARGS,
- "Return temperature information for a given CPU core number."},
+ {"sensors_battery", psutil_sensors_battery, METH_VARARGS},
+ {"sensors_cpu_temperature", psutil_sensors_cpu_temperature, METH_VARARGS},
#endif
// --- others
- {"set_debug", psutil_set_debug, METH_VARARGS,
- "Enable or disable PSUTIL_DEBUG messages"},
+ {"set_debug", psutil_set_debug, METH_VARARGS},
{NULL, NULL, 0, NULL}
};