diff options
author | Martin Baulig <martin@home-of-linux.org> | 1999-05-09 13:54:03 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1999-05-09 13:54:03 +0000 |
commit | 393c1dba7565a884b0dad7dd8a850317881b8dca (patch) | |
tree | 6e2859c18d75055595b70a7e247c8c9be08bad44 /doc/reference.texi | |
parent | 5b76314ef449fd215f2a1f60a86bab4812467614 (diff) | |
download | libgtop-393c1dba7565a884b0dad7dd8a850317881b8dca.tar.gz |
Split the `libgtop.texi' into one file pro chapter, this is the "About
1999-05-09 Martin Baulig <martin@home-of-linux.org>
* about.texi: Split the `libgtop.texi' into one file pro chapter,
this is the "About LibGTop".
* reference.texi: The "LibGTop Reference Manual".
Diffstat (limited to 'doc/reference.texi')
-rw-r--r-- | doc/reference.texi | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/doc/reference.texi b/doc/reference.texi new file mode 100644 index 00000000..a3044247 --- /dev/null +++ b/doc/reference.texi @@ -0,0 +1,73 @@ +@node Reference Manual, , About, Top +@chapter LibGTop Reference Manual + +@menu +* glibtop_cpu:: CPU Usage. +@end menu + +@node glibtop_cpu, , Reference Manual, Reference Manual +@section CPU Usage + +Declaration of @code{glibtop_cpu} in @file{<glibtop/cpu.h}: + +@example +@cartouche +typedef struct _glibtop_cpu glibtop_cpu; + +struct _glibtop_cpu +@{ + u_int64_t flags, + total, + user, + nice, + sys, + idle, + frequency, + xcpu_total [GLIBTOP_NCPU], + xcpu_user [GLIBTOP_NCPU], + xcpu_nice [GLIBTOP_NCPU], + xcpu_sys [GLIBTOP_NCPU], + xcpu_idle [GLIBTOP_NCPU], + xcpu_flags; +@}; +@end cartouche +@end example + +All CPU units are measured in @dfn{jiffies} which are normally 1/100th of a +second (in which case @code{frequency} equals 100), but can also be in any +other unit. To get seconds, divide them by @code{frequency}. + +@table @code +@item total +Number of clock ticks since system boot. + +@item user +Number of clock ticks the system spent in user mode. + +@item nice +Number of clock ticks the system spent in user mode (nice). + +@item sys +Number of clock ticks the system spent in system mode. + +@item idle +Number of clock ticks the system spent in the idle task. + +@item frequency +Tick frequency (default is 100). + +@end table + +The @samp{xcpu_} values are for SMP systems - they are the same than +@code{total}, @code{user}, @code{nice}, @code{sys} and @code{idle} +except that they are arrays of @code{GLIBTOP_NCPU} (defined in +@file{<glibtop/limits.h>}) elements and contain one value for each CPU +in the system. + +@table @code +@item xcpu_flags +This is interpreted as a bit-field: on systems like Solaris, not all CPUs +need to be running all the time, so we set the corresponding bit for each +CPU that is currently running. +@end table + |