Revert "Revert "New API to retrieve disk stats in Linux""

This reverts commit 7e214414bf.
This commit is contained in:
James Dominic P. Guana
2021-04-10 18:19:15 +08:00
committed by Robert Roth
parent 68b5269607
commit a067db0569
18 changed files with 272 additions and 3 deletions
+14
View File
@@ -64,6 +64,20 @@ glibtop_get_cpu(glibtop_cpu *buf)
}
/**
* glibtop_get_disk:
* @buf: A location to return the disk usage.
*
* Get the DISK usage.
*
*/
void
glibtop_get_cpu(glibtop_cpu *buf)
{
glibtop_get_cpu_l(glibtop_global_server, buf);
}
/**
* glibtop_get_fsusage:
* @buf: A location to return the file system usage.
+3
View File
@@ -30,6 +30,9 @@ const _glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_CPU
_glibtop_init_cpu_p,
#endif
#if GLIBTOP_SUID_DISK
_glibtop_init_disk_p,
#endif
#if GLIBTOP_SUID_MEM
_glibtop_init_mem_p,
#endif