diff options
author | Robert Roth <robert.roth.off@gmail.com> | 2017-05-23 00:02:47 +0300 |
---|---|---|
committer | Robert Roth <robert.roth.off@gmail.com> | 2017-05-23 00:02:47 +0300 |
commit | 43740ddab78203c0042587535987fe1a9f8b254a (patch) | |
tree | 117b69e29955a287a7fc70776646a7c1c8cdb2d9 /sysdeps/common | |
parent | 2e2215c5b64eca4674e31724725c6e36f1f43aae (diff) | |
parent | 063de1a7126e0b4d978f51bb7e408c474a8c7755 (diff) | |
download | libgtop-43740ddab78203c0042587535987fe1a9f8b254a.tar.gz |
Merge branch 'wip/diskio'
Diffstat (limited to 'sysdeps/common')
-rw-r--r-- | sysdeps/common/default.c | 15 | ||||
-rw-r--r-- | sysdeps/common/sysdeps_suid.c | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sysdeps/common/default.c b/sysdeps/common/default.c index 2df25ee6..e3b096f2 100644 --- a/sysdeps/common/default.c +++ b/sysdeps/common/default.c @@ -431,3 +431,18 @@ glibtop_get_proc_affinity(glibtop_proc_affinity *buf, pid_t pid) { return glibtop_get_proc_affinity_l(glibtop_global_server, buf, pid); } + +/** + * glibtop_get_proc_io: Get the io stats for the given pid + * @buf: Buffer where the result will be given + * @pid: Process id to get the io stats for + * + * Get the io stats for a process + * + * Returns: A list of processor ID of 'buf.number' elements. + */ +void +glibtop_get_proc_io(glibtop_proc_io *buf, pid_t pid) +{ + return glibtop_get_proc_io_l(glibtop_global_server, buf, pid); +} diff --git a/sysdeps/common/sysdeps_suid.c b/sysdeps/common/sysdeps_suid.c index 91ff806c..24953176 100644 --- a/sysdeps/common/sysdeps_suid.c +++ b/sysdeps/common/sysdeps_suid.c @@ -90,6 +90,9 @@ const _glibtop_init_func_t _glibtop_init_hook_p [] = { #if GLIBTOP_SUID_PPP _glibtop_init_ppp_p, #endif +#if GLIBTOP_SUID_PROC_IO + _glibtop_init_proc_io_p, +#endif NULL }; |