diff options
author | James Dominic P. Guana <guana.histark@gmail.com> | 2021-04-10 18:20:28 +0800 |
---|---|---|
committer | Robert Roth <robert.roth.off@gmail.com> | 2021-04-23 09:48:11 +0000 |
commit | b738a0ae09d793edbde06519e04142cc72e6187c (patch) | |
tree | a24a0076472c1a1e3877ba8430679b0a7e9c5714 /doc | |
parent | 2ec1815e6ce8da65244c18fbad56c06721f737cb (diff) | |
download | libgtop-b738a0ae09d793edbde06519e04142cc72e6187c.tar.gz |
Revert "Revert "Updated config and added reference""
This reverts commit 2229253e11ae5c729a703f0c72e006f46746c592.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/main.texi | 1 | ||||
-rw-r--r-- | doc/reference.texi | 59 | ||||
-rw-r--r-- | doc/reference/libgtop-sections.txt | 22 |
3 files changed, 63 insertions, 19 deletions
diff --git a/doc/main.texi b/doc/main.texi index 6945d651..f6a1ddde 100644 --- a/doc/main.texi +++ b/doc/main.texi @@ -49,6 +49,7 @@ System Dependent Functions * glibtop_proc_map:: Process Memory Maps. * glibtop_netload:: Network Load. * glibtop_ppp:: PPP Usage. +* glibtop_disk:: DISK Usage. Common Functions diff --git a/doc/reference.texi b/doc/reference.texi index cdba6887..55970001 100644 --- a/doc/reference.texi +++ b/doc/reference.texi @@ -28,6 +28,7 @@ * glibtop_proc_map:: Process Memory Maps. * glibtop_netload:: Network Load. * glibtop_ppp:: PPP Usage. +* glibtop_disk:: DISK Usage. @end menu @node glibtop_cpu, glibtop_mem, System Dependent, System Dependent @@ -1343,7 +1344,7 @@ enum @{ @end example @page -@node glibtop_ppp, , glibtop_netload, System Dependent +@node glibtop_ppp, glibtop_disk, glibtop_netload, System Dependent @subsection PPP Statistics Library function @code{glibtop_get_ppp}: @@ -1404,6 +1405,62 @@ We're currently online. @end table @page +@node glibtop_disk, , glibtop_ppp, System Dependent +@subsection DISK Usage + +Library function @code{glibtop_get_disk}: + +@example +@cartouche +void glibtop_get_disk (glibtop_disk *buf); +void glibtop_get_disk_l (glibtop *server, glibtop_disk *buf); +@end cartouche +@end example + +Declaration of @code{glibtop_disk} in @file{<glibtop/disk.h>}: + +@example +@cartouche +typedef struct _glibtop_disk glibtop_disk; + +struct _glibtop_disk +@{ + xdisk_sectors_read [GLIBTOP_NDISK], + xdisk_time_read [GLIBTOP_NDISK], + xdisk_sectors_write [GLIBTOP_NDISK], + xdisk_time_write [GLIBTOP_NDISK], +@}; +@end cartouche +@end example + +All DISK reads and writes are measured by @dfn{sectors} which are normally 512 bytes each. +All disk time are measured in milliseconds which is 1/1000th of a second. + +@table @code +@item xdisk_sectors_read +Number of sectors read since system boot. + +@item xdisk_time_read +Number of milliseconds spent reading since system boot. + +@item xdisk_sectors_write +Number of sectors written since system boot. + +@item xdisk_time_write +Number of milliseconds spent writing since system boot. + +@end table + +The @samp{xdisk_} are values from arrays of @code{GLIBTOP_NDISK} (defined in +@file{<glibtop/disk.h>}) elements and contain one value for each DISK +in the system. + +Please note that all of the disk values are absolute values measured in +certain units since system boot. To get bandwidth values (bytes/s), you need to call @code{glibtop_disk}, save the +result, wait some time and then call it again and divide the differences of +the two values by the time spent reading or writing. + +@page @node Common Functions, Library Functions, System Dependent, Reference Manual @section Common Functions diff --git a/doc/reference/libgtop-sections.txt b/doc/reference/libgtop-sections.txt index 3d6d710d..63137481 100644 --- a/doc/reference/libgtop-sections.txt +++ b/doc/reference/libgtop-sections.txt @@ -682,24 +682,10 @@ glibtop_get_cpu_s <INCLUDE>glibtop/disk.h</INCLUDE> <SECTION> <FILE>disk</FILE> -GLIBTOP_DISK_TOTAL -GLIBTOP_DISK_USER -GLIBTOP_DISK_NICE -GLIBTOP_DISK_SYS -GLIBTOP_DISK_IDLE -GLIBTOP_DISK_FREQUENCY -GLIBTOP_XDISK_TOTAL -GLIBTOP_XDISK_USER -GLIBTOP_XDISK_NICE -GLIBTOP_XDISK_SYS -GLIBTOP_XDISK_IDLE -GLIBTOP_XDISK_FLAGS -GLIBTOP_DISK_IOWAIT -GLIBTOP_DISK_IRQ -GLIBTOP_DISK_SOFTIRQ -GLIBTOP_XDISK_IOWAIT -GLIBTOP_XDISK_IRQ -GLIBTOP_XDISK_SOFTIRQ +LIBTOP_XDISK_SECTORS_READ +GLIBTOP_XDISK_TIME_READ +GLIBTOP_XDISK_SECTORS_WRITE +GLIBTOP_XDISK_TIME_WRITE GLIBTOP_MAX_DISK GLIBTOP_NDISK glibtop_disk |