From 9055b90aef62482925ef4d8eba5471ebb07e8a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Sat, 2 Dec 2006 13:42:48 +0000 Subject: [PATCH] =?UTF-8?q?Converted=20to=20gtk-doc.=20Patch=20by=20Germ?= =?UTF-8?q?=C3=A1n=20Po=C3=B3-Caama=C3=B1o=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2006-12-02 Benoît Dejean * Makefile.am: * configure.in: * doc/Makefile.am: * doc/reference/Makefile.am: * doc/reference/libgtop-docs.xml: * doc/reference/libgtop-sections.txt: * doc/reference/version.xml.in: * gtk-doc.make: * sysdeps/common/default.c: Converted to gtk-doc. Patch by Germán Poó-Caamaño . --- ChangeLog | 15 + Makefile.am | 1 + configure.in | 4 + doc/Makefile.am | 2 + doc/reference/Makefile.am | 59 +++ doc/reference/libgtop-docs.xml | 206 ++++++++ doc/reference/libgtop-sections.txt | 754 +++++++++++++++++++++++++++++ doc/reference/version.xml.in | 4 + gtk-doc.make | 155 ++++++ sysdeps/common/default.c | 144 ++++++ 10 files changed, 1344 insertions(+) create mode 100644 doc/reference/Makefile.am create mode 100644 doc/reference/libgtop-docs.xml create mode 100644 doc/reference/libgtop-sections.txt create mode 100644 doc/reference/version.xml.in create mode 100644 gtk-doc.make diff --git a/ChangeLog b/ChangeLog index bc4bfa60..84407fa6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2006-12-02 Benoît Dejean + + * Makefile.am: + * configure.in: + * doc/Makefile.am: + * doc/reference/Makefile.am: + * doc/reference/libgtop-docs.xml: + * doc/reference/libgtop-sections.txt: + * doc/reference/version.xml.in: + * gtk-doc.make: + * sysdeps/common/default.c: + + Converted to gtk-doc. + Patch by Germán Poó-Caamaño . + 2006-12-01 Julio M. Merino Vidal * configure.in: diff --git a/Makefile.am b/Makefile.am index 1bcc2f7d..016313fa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,3 +32,4 @@ pkgconfig_DATA = libgtop-2.0.pc libgtop-features.def: features.def @LN_S@ $< $@ +DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc diff --git a/configure.in b/configure.in index 1ad11e7f..a8398d77 100644 --- a/configure.in +++ b/configure.in @@ -391,6 +391,8 @@ fi AC_SUBST(sysdeps_suid_lib) AC_SUBST(server_programs) +GTK_DOC_CHECK(1.4) + AC_CONFIG_FILES([ Makefile libgtop.spec @@ -414,6 +416,8 @@ src/inodedb/Makefile lib/Makefile examples/Makefile doc/Makefile +doc/reference/Makefile +doc/reference/version.xml libgtop-2.0.pc libgtopconfig.h ]) diff --git a/doc/Makefile.am b/doc/Makefile.am index 23f26b7d..d5fc0814 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS = reference + info_TEXINFOS = libgtop2.texi libgtop2_TEXINFOS = libgtop2.texi about.texi reference.texi \ diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am new file mode 100644 index 00000000..8cf9a7c1 --- /dev/null +++ b/doc/reference/Makefile.am @@ -0,0 +1,59 @@ +AUTOMAKE_OPTIONS = 1.6 +## Process this file with automake to produce Makefile.in +# The name of the module, e.g. 'glib'. +DOC_MODULE=libgtop + +# The top-level SGML file. You can change this if you want to. +DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml + +# Extra options to pass to gtkdoc-scangobj. Not normally needed. +# SCANGOBJ_OPTIONS= + +# Extra options to supply to gtkdoc-scan. +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" +SCAN_OPTIONS= + +# Extra options to supply to gtkdoc-mkdb. +# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml +MKDB_OPTIONS=--sgml-mode --output-format=xml --source-dir=../../sysdeps/common + +# The directory containing the source code. Relative to $(srcdir). +# gtk-doc will search all .c & .h files beneath here for inline comments +# documenting the functions and macros. +# e.g. DOC_SOURCE_DIR=../../../gtk +DOC_SOURCE_DIR=../../include/glibtop + +# Used for dependencies. The docs will be rebuilt if any of these change. +# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h +# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c +HFILE_GLOB=../../include/glibtop/*.h +CFILE_GLOB=../../sysdeps/common/*.c + +# Header files to ignore when scanning. +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h +IGNORE_HFILES=error.h global.h gnuserv.h init_hooks.h write.h read.h read_data.h config.h libgtopconfig.h + +EXTRA_HFILES=../../glibtop.h + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). +# e.g. content_files=running.sgml building.sgml changes-2.0.sgml +content_files=version.xml + +# Images to copy into HTML directory. +# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png +HTML_IMAGES= + +# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. +# Only needed if you are using gtkdoc-scangobj to dynamically query widget +# signals and properties. +# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) +INCLUDES= +GTKDOC_LIBS= + +# This includes the standard gtk-doc make rules, copied by gtkdocize. +include $(top_srcdir)/gtk-doc.make + +# Other files to distribute +# e.g. EXTRA_DIST += version.xml.in +EXTRA_DIST += version.xml.in diff --git a/doc/reference/libgtop-docs.xml b/doc/reference/libgtop-docs.xml new file mode 100644 index 00000000..b3eaede8 --- /dev/null +++ b/doc/reference/libgtop-docs.xml @@ -0,0 +1,206 @@ + + + + + Libgtop Reference Manual + for libgtop + + + Martin + Baulig + +
+ martin@home-of-linux.org +
+
+ + Germán + Poó-Caamaño + +
+ gpoo@ubiobio.cl +
+
+
+
+ + + Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free + Documentation License, Version 1.1 or any later + version published by the Free Software Foundation with no + Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. You may obtain a copy of the GNU Free + Documentation License from the Free Software + Foundation by visiting their Web site or by writing + to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Many of the names used by companies to distinguish their + products and services are claimed as trademarks. Where those + names appear in any GNOME documentation, and those trademarks + are made aware to the members of the GNOME Documentation + Project, the names have been printed in caps or initial + caps. + + + + + LibGTop is a library to get system specific data such as CPU and + Memory Usage and information about running Processes. + + On Systems like Solaris or Digital Unix where you need special + privileges to get those data, it uses a setuid/setgid server to do + so. + + Even if LibGTop is a part of the GNOME desktop environment + (@uref{http://www.gnome.org}), the main interface of LibGTop is totally + independent from any particular desktop environment, so you can also + use it as a standalone library in any piece of GPLed software. + + This manual documents the interfaces of the libgtop + library and has some short notes to help get you up to speed + with using the library. + +
+ + + + + White paper + + + Introduction + Many modern UNIX systems like Solaris, BSD or Digitial Unix + only allow priviledged processes to read information like CPU and + Memory Usage or information about running processes. + + + + BSD, for instance, doesn't have any other way to get those data than reading + directly from @file{/dev/kmem} and you need to be in the @code{kmem} group to + be able to read this. + + + Other systems, like Digital Unix, allow all users to get things like CPU and + Memory statistics, but only root may read information about any process other + than the current one (you may not even get information about your own processes + if you're not root). + + + Linux has a very nice @file{/proc} filesystem, but reading and parsing + @file{/proc} is very slow and inefficient. + + + Solaris is a bit better, but you still need to be in the @code{sys} group or + even root to get some data. + + + + Because of this system utilities like @code{ps}, @code{uptime} or @code{top} + often are setgid kmem or setuid root. Usually, they're also very specific to + the system they're written for and not easily portable to other systems without + a lot of work. + + + This, of cause, becomes a problem for graphical tools like @code{gtop} - making + a GTK+ program setgid or even setuid would be a security hole as big as you can + drive the entire X11 source code through. For the GNOME project, we also needed + some kind of library which provides all the required information in a portable + since there's more than just one single program that wants to use them - for + instance @code{gtop} and the @code{multiload}, @code{cpumemusage} and + @code{netload} panel applets. + + + + + Overview + This section should give you a short overview on how LibGTop + was developed, which things needed to be considered and how it + works. + + + Interface Design: Things that need to be considered + +At the very beginning, it was necessary to collect all the data the library part +should provide and put them into some C structures. This was not that easiy as it +might sound since LibGTop should be portable to any modern UNIX system with a common +library part on all those systems, but the data that should be returned vary from +system to system. For instance some systems support shared memory, but some others +may not. + + +The header files where we define these C structures (which are system-independent) are +shared between client and server. This way we can call the system dependent code +directly where we do not need any special privileges to do so. + + +All of those structures contain a @code{flags} member which is interpreted as a bit +mask and tells the caller of the library functions which of the fields in the returned +structure are valid and which are not. + + + + Server Implementation: The LibGTop "server" + +The LibGTop @dfn{server} is a setgid/setuid binary which contains all the system +dependent code which needs special privileges. It is only build if it's required +on the current system (for instance, the Linux kernel provides all the required +data via its @file{/proc} filesystem so we do not need the server at all) and it +only contains the @dfn{features} which need privileges. + + +Whenever we do not need any privileges to get all the data for some of the requested +structures (here called @dfn{features}) the library calls the sysdeps code directly +rather than using the server. + + + + + + + Libgtop Library Reference + + This section contains the API reference for libgtop. All + the public interfaces are documented here. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/doc/reference/libgtop-sections.txt b/doc/reference/libgtop-sections.txt new file mode 100644 index 00000000..8e6cc406 --- /dev/null +++ b/doc/reference/libgtop-sections.txt @@ -0,0 +1,754 @@ +glibtop.h +
+glibtop +GlibTop +GLIBTOP_MOUNTENTRY_LEN +LIBGTOP_CHECK_VERSION +glibtop +glibtop_global_server +glibtop_init +glibtop_init_r +glibtop_init_s +glibtop_server_features +
+ +glibtop/close.h +
+close +Close +glibtop_close +glibtop_close_r +glibtop_close_s +glibtop_close_p +
+ +glibtop/command.h +
+command +Command +GLIBTOP_CMND_QUIT +GLIBTOP_CMND_SYSDEPS +GLIBTOP_CMND_CPU +GLIBTOP_CMND_MEM +GLIBTOP_CMND_SWAP +GLIBTOP_CMND_UPTIME +GLIBTOP_CMND_LOADAVG +GLIBTOP_CMND_SHM_LIMITS +GLIBTOP_CMND_MSG_LIMITS +GLIBTOP_CMND_SEM_LIMITS +GLIBTOP_CMND_PROCLIST +GLIBTOP_CMND_PROC_STATE +GLIBTOP_CMND_PROC_UID +GLIBTOP_CMND_PROC_MEM +GLIBTOP_CMND_PROC_TIME +GLIBTOP_CMND_PROC_SIGNAL +GLIBTOP_CMND_PROC_KERNEL +GLIBTOP_CMND_PROC_SEGMENT +GLIBTOP_CMND_PROC_ARGS +GLIBTOP_CMND_PROC_MAP +GLIBTOP_CMND_MOUNTLIST +GLIBTOP_CMND_FSUSAGE +GLIBTOP_CMND_NETLOAD +GLIBTOP_CMND_PPP +GLIBTOP_CMND_NETLIST +GLIBTOP_CMND_PROC_OPEN_FILES +GLIBTOP_MAX_CMND +glibtop_command +glibtop_response +glibtop_response_union +glibtop_call +glibtop_call_l +glibtop_call_s +
+ +glibtop/glibtop-server.h +
+glibtop-server +GlibTop Server +glibtop_server +glibtop_server_info +glibtop_closure +glibtop_server_new +glibtop_server_ref +glibtop_server_unref +
+ +glibtop/inodedb.h +
+inodedb +Inode DB +GLIBTOP_INODEDB_SYSTEM +GLIBTOP_INODEDB_USER +GLIBTOP_INODEDB_CACHE +GLIBTOP_INODEDB_ALL +glibtop_inodedb +glibtop_inodedb_key +glibtop_inodedb_open +glibtop_inodedb_lookup +glibtop_inodedb_close +glibtop_inodedb_open_s +glibtop_inodedb_lookup_s +glibtop_inodedb_close_s +
+ +glibtop/netload.h +
+netload +Net Load +GLIBTOP_NETLOAD_IF_FLAGS +GLIBTOP_NETLOAD_MTU +GLIBTOP_NETLOAD_SUBNET +GLIBTOP_NETLOAD_ADDRESS +GLIBTOP_NETLOAD_PACKETS_IN +GLIBTOP_NETLOAD_PACKETS_OUT +GLIBTOP_NETLOAD_PACKETS_TOTAL +GLIBTOP_NETLOAD_BYTES_IN +GLIBTOP_NETLOAD_BYTES_OUT +GLIBTOP_NETLOAD_BYTES_TOTAL +GLIBTOP_NETLOAD_ERRORS_IN +GLIBTOP_NETLOAD_ERRORS_OUT +GLIBTOP_NETLOAD_ERRORS_TOTAL +GLIBTOP_NETLOAD_COLLISIONS +GLIBTOP_NETLOAD_ADDRESS6 +GLIBTOP_NETLOAD_PREFIX6 +GLIBTOP_NETLOAD_SCOPE6 +GLIBTOP_NETLOAD_HWADDRESS +GLIBTOP_MAX_NETLOAD +glibtop_netload +glibtop_get_netload +glibtop_get_netload_r +glibtop_get_netload_l +glibtop_init_netload_p +glibtop_get_netload_p +glibtop_init_netload_s +glibtop_get_netload_s +
+ +glibtop/ppp.h +
+ppp +PPP +GLIBTOP_PPP_STATE +GLIBTOP_PPP_BYTES_IN +GLIBTOP_PPP_BYTES_OUT +GLIBTOP_MAX_PPP +glibtop_ppp +glibtop_get_ppp +glibtop_get_ppp_r +glibtop_get_ppp_l +glibtop_init_ppp_p +glibtop_get_ppp_p +glibtop_init_ppp_s +glibtop_get_ppp_s +
+ +glibtop/shm_limits.h +
+shm_limits +Shared Memory Limits +GLIBTOP_IPC_SHMMAX +GLIBTOP_IPC_SHMMIN +GLIBTOP_IPC_SHMMNI +GLIBTOP_IPC_SHMSEG +GLIBTOP_IPC_SHMALL +GLIBTOP_MAX_SHM_LIMITS +glibtop_shm_limits +glibtop_get_shm_limits +glibtop_get_shm_limits_r +glibtop_get_shm_limits_l +glibtop_init_shm_limits_p +glibtop_get_shm_limits_p +glibtop_init_shm_limits_s +glibtop_get_shm_limits_s +
+ +glibtop/uptime.h +
+uptime +Uptime +GLIBTOP_UPTIME_UPTIME +GLIBTOP_UPTIME_IDLETIME +GLIBTOP_UPTIME_BOOT_TIME +GLIBTOP_MAX_UPTIME +glibtop_uptime +glibtop_get_uptime +glibtop_get_uptime_r +glibtop_get_uptime_l +glibtop_init_uptime_p +glibtop_get_uptime_p +glibtop_init_uptime_s +glibtop_get_uptime_s +
+ +glibtop/netlist.h +
+netlist +Net List +GLIBTOP_NETLIST_NUMBER +GLIBTOP_MAX_NETLIST +glibtop_netlist +glibtop_get_netlist +glibtop_get_netlist_r +glibtop_get_netlist_l +glibtop_init_netlist_p +glibtop_get_netlist_p +glibtop_init_netlist_s +glibtop_get_netlist_s +
+ +glibtop/open.h +
+open +GLIBTOP_INIT_NO_OPEN +GLIBTOP_INIT_NO_INIT +GLIBTOP_FEATURES_NO_SERVER +GLIBTOP_FEATURES_EXCEPT +GLIBTOP_METHOD_DIRECT +GLIBTOP_METHOD_PIPE +GLIBTOP_METHOD_INET +GLIBTOP_METHOD_UNIX +GLIBTOP_ERROR_METHOD_IGNORE +GLIBTOP_ERROR_METHOD_WARN_ONCE +GLIBTOP_ERROR_METHOD_WARN +GLIBTOP_ERROR_METHOD_ABORT +GLIBTOP_ERROR_METHOD_DEFAULT +glibtop_open_l +glibtop_init_p +glibtop_open_p +glibtop_open_s +
+ +glibtop/parameter.h +
+parameter +GLIBTOP_PARAM_METHOD +GLIBTOP_PARAM_FEATURES +GLIBTOP_PARAM_COMMAND +GLIBTOP_PARAM_HOST +GLIBTOP_PARAM_PORT +GLIBTOP_PARAM_ERROR_METHOD +GLIBTOP_PARAM_REQUIRED +glibtop_get_parameter +glibtop_set_parameter +glibtop_get_parameter_l +glibtop_set_parameter_l +
+ +glibtop/procargs.h +
+procargs +GLIBTOP_PROC_ARGS_SIZE +GLIBTOP_MAX_PROC_ARGS +glibtop_proc_args +glibtop_get_proc_args_l +glibtop_get_proc_args +glibtop_get_proc_args_r +glibtop_init_proc_args_p +glibtop_get_proc_args_p +glibtop_init_proc_args_s +glibtop_get_proc_args_s +glibtop_get_proc_argv_l +glibtop_get_proc_argv +
+ +glibtop/procmem.h +
+procmem +GLIBTOP_PROC_MEM_SIZE +GLIBTOP_PROC_MEM_VSIZE +GLIBTOP_PROC_MEM_RESIDENT +GLIBTOP_PROC_MEM_SHARE +GLIBTOP_PROC_MEM_RSS +GLIBTOP_PROC_MEM_RSS_RLIM +GLIBTOP_MAX_PROC_MEM +glibtop_proc_mem +glibtop_get_proc_mem +glibtop_get_proc_mem_r +glibtop_get_proc_mem_l +glibtop_init_proc_mem_p +glibtop_get_proc_mem_p +glibtop_init_proc_mem_s +glibtop_get_proc_mem_s +
+ +glibtop/procopenfiles.h +
+procopenfiles +GLIBTOP_PROC_OPEN_FILES_NUMBER +GLIBTOP_PROC_OPEN_FILES_TOTAL +GLIBTOP_PROC_OPEN_FILES_SIZE +GLIBTOP_MAX_PROC_OPEN_FILES +GLIBTOP_FILE_ENTRY_FD +GLIBTOP_FILE_ENTRY_NAME +GLIBTOP_FILE_ENTRY_TYPE +GLIBTOP_FILE_ENTRY_INETSOCKET_DST_HOST +GLIBTOP_FILE_ENTRY_INETSOCKET_DST_PORT +GLIBTOP_MAX_OPEN_FILE_ENTRY +GLIBTOP_OPEN_FILENAME_LEN +GLIBTOP_OPEN_DEST_HOST_LEN +glibtop_open_files_entry +glibtop_proc_open_files +glibtop_get_proc_open_files +glibtop_get_proc_open_files_r +glibtop_get_proc_open_files_l +glibtop_init_proc_open_files_p +glibtop_get_proc_open_files_p +glibtop_init_proc_open_files_s +glibtop_get_proc_open_files_s +
+ +glibtop/procsegment.h +
+procsegment +GLIBTOP_PROC_SEGMENT_TEXT_RSS +GLIBTOP_PROC_SEGMENT_SHLIB_RSS +GLIBTOP_PROC_SEGMENT_DATA_RSS +GLIBTOP_PROC_SEGMENT_STACK_RSS +GLIBTOP_PROC_SEGMENT_DIRTY_SIZE +GLIBTOP_PROC_SEGMENT_START_CODE +GLIBTOP_PROC_SEGMENT_END_CODE +GLIBTOP_PROC_SEGMENT_START_STACK +GLIBTOP_MAX_PROC_SEGMENT +glibtop_proc_segment +glibtop_get_proc_segment +glibtop_get_proc_segment_r +glibtop_get_proc_segment_l +glibtop_init_proc_segment_p +glibtop_get_proc_segment_p +glibtop_init_proc_segment_s +glibtop_get_proc_segment_s +
+ +glibtop/procsignal.h +
+procsignal +GLIBTOP_PROC_SIGNAL_SIGNAL +GLIBTOP_PROC_SIGNAL_BLOCKED +GLIBTOP_PROC_SIGNAL_SIGIGNORE +GLIBTOP_PROC_SIGNAL_SIGCATCH +GLIBTOP_MAX_PROC_SIGNAL +glibtop_proc_signal +glibtop_get_proc_signal +glibtop_get_proc_signal_r +glibtop_get_proc_signal_l +glibtop_init_proc_signal_p +glibtop_get_proc_signal_p +glibtop_init_proc_signal_s +glibtop_get_proc_signal_s +
+ +glibtop/sysdeps.h +
+sysdeps +GLIBTOP_SYSDEPS_FEATURES +GLIBTOP_SYSDEPS_CPU +GLIBTOP_SYSDEPS_MEM +GLIBTOP_SYSDEPS_SWAP +GLIBTOP_SYSDEPS_UPTIME +GLIBTOP_SYSDEPS_LOADAVG +GLIBTOP_SYSDEPS_SHM_LIMITS +GLIBTOP_SYSDEPS_MSG_LIMITS +GLIBTOP_SYSDEPS_SEM_LIMITS +GLIBTOP_SYSDEPS_PROCLIST +GLIBTOP_SYSDEPS_PROC_STATE +GLIBTOP_SYSDEPS_PROC_UID +GLIBTOP_SYSDEPS_PROC_MEM +GLIBTOP_SYSDEPS_PROC_TIME +GLIBTOP_SYSDEPS_PROC_SIGNAL +GLIBTOP_SYSDEPS_PROC_KERNEL +GLIBTOP_SYSDEPS_PROC_SEGMENT +GLIBTOP_SYSDEPS_PROC_ARGS +GLIBTOP_SYSDEPS_PROC_MAP +GLIBTOP_SYSDEPS_MOUNTLIST +GLIBTOP_SYSDEPS_FSUSAGE +GLIBTOP_SYSDEPS_NETLOAD +GLIBTOP_SYSDEPS_PPP +GLIBTOP_SYSDEPS_NETLIST +GLIBTOP_SYSDEPS_PROC_OPEN_FILES +GLIBTOP_MAX_SYSDEPS +GLIBTOP_SYSDEPS_ALL +glibtop_sysdeps +glibtop_get_sysdeps +glibtop_get_sysdeps_r +
+ +glibtop/procstate.h +
+procstate +GLIBTOP_PROC_STATE_CMD +GLIBTOP_PROC_STATE_STATE +GLIBTOP_PROC_STATE_UID +GLIBTOP_PROC_STATE_GID +GLIBTOP_PROC_STATE_RUID +GLIBTOP_PROC_STATE_RGID +GLIBTOP_PROC_STATE_HAS_CPU +GLIBTOP_PROC_STATE_PROCESSOR +GLIBTOP_PROC_STATE_LAST_PROCESSOR +GLIBTOP_MAX_PROC_STATE +GLIBTOP_PROCESS_RUNNING +GLIBTOP_PROCESS_INTERRUPTIBLE +GLIBTOP_PROCESS_UNINTERRUPTIBLE +GLIBTOP_PROCESS_ZOMBIE +GLIBTOP_PROCESS_STOPPED +GLIBTOP_PROCESS_SWAPPING +GLIBTOP_PROCESS_DEAD +glibtop_proc_state +glibtop_get_proc_state +glibtop_get_proc_state_r +glibtop_get_proc_state_l +glibtop_init_proc_state_p +glibtop_get_proc_state_p +glibtop_init_proc_state_s +glibtop_get_proc_state_s +
+ +glibtop/procuid.h +
+procuid +GLIBTOP_PROC_UID_UID +GLIBTOP_PROC_UID_EUID +GLIBTOP_PROC_UID_GID +GLIBTOP_PROC_UID_EGID +GLIBTOP_PROC_UID_SUID +GLIBTOP_PROC_UID_SGID +GLIBTOP_PROC_UID_FSUID +GLIBTOP_PROC_UID_FSGID +GLIBTOP_PROC_UID_PID +GLIBTOP_PROC_UID_PPID +GLIBTOP_PROC_UID_PGRP +GLIBTOP_PROC_UID_SESSION +GLIBTOP_PROC_UID_TTY +GLIBTOP_PROC_UID_TPGID +GLIBTOP_PROC_UID_PRIORITY +GLIBTOP_PROC_UID_NICE +GLIBTOP_PROC_UID_NGROUPS +GLIBTOP_PROC_UID_GROUPS +GLIBTOP_MAX_PROC_UID +glibtop_proc_uid +GLIBTOP_MAX_GROUPS +glibtop_get_proc_uid +glibtop_get_proc_uid_r +glibtop_get_proc_uid_l +glibtop_init_proc_uid_p +glibtop_get_proc_uid_p +glibtop_init_proc_uid_s +glibtop_get_proc_uid_s +
+ +glibtop/proctime.h +
+proctime +GLIBTOP_PROC_TIME_START_TIME +GLIBTOP_PROC_TIME_RTIME +GLIBTOP_PROC_TIME_UTIME +GLIBTOP_PROC_TIME_STIME +GLIBTOP_PROC_TIME_CUTIME +GLIBTOP_PROC_TIME_CSTIME +GLIBTOP_PROC_TIME_TIMEOUT +GLIBTOP_PROC_TIME_IT_REAL_VALUE +GLIBTOP_PROC_TIME_FREQUENCY +GLIBTOP_PROC_TIME_XCPU_UTIME +GLIBTOP_PROC_TIME_XCPU_STIME +GLIBTOP_MAX_PROC_TIME +glibtop_proc_time +glibtop_get_proc_time +glibtop_get_proc_time_r +glibtop_get_proc_time_l +glibtop_init_proc_time_p +glibtop_get_proc_time_p +glibtop_init_proc_time_s +glibtop_get_proc_time_s +
+ +glibtop/signal.h +
+signal +glibtop_signame +
+ +glibtop/procmap.h +
+procmap +GLIBTOP_PROC_MAP_NUMBER +GLIBTOP_PROC_MAP_TOTAL +GLIBTOP_PROC_MAP_SIZE +GLIBTOP_MAX_PROC_MAP +GLIBTOP_MAP_ENTRY_START +GLIBTOP_MAP_ENTRY_END +GLIBTOP_MAP_ENTRY_OFFSET +GLIBTOP_MAP_ENTRY_PERM +GLIBTOP_MAP_ENTRY_INODE +GLIBTOP_MAP_ENTRY_DEVICE +GLIBTOP_MAP_ENTRY_FILENAME +GLIBTOP_MAP_ENTRY_SIZE +GLIBTOP_MAP_ENTRY_RSS +GLIBTOP_MAP_ENTRY_SHARED_CLEAN +GLIBTOP_MAP_ENTRY_SHARED_DIRTY +GLIBTOP_MAP_ENTRY_PRIVATE_CLEAN +GLIBTOP_MAP_ENTRY_PRIVATE_DIRTY +GLIBTOP_MAX_MAP_ENTRY +GLIBTOP_MAP_FILENAME_LEN +GLIBTOP_MAP_PERM_READ +GLIBTOP_MAP_PERM_WRITE +GLIBTOP_MAP_PERM_EXECUTE +GLIBTOP_MAP_PERM_SHARED +GLIBTOP_MAP_PERM_PRIVATE +glibtop_map_entry +glibtop_proc_map +glibtop_get_proc_map +glibtop_get_proc_map_r +glibtop_get_proc_map_l +glibtop_init_proc_map_p +glibtop_get_proc_map_p +glibtop_init_proc_map_s +glibtop_get_proc_map_s +
+ +glibtop/sysinfo.h +
+sysinfo +GLIBTOP_SYSINFO_NCPU +GLIBTOP_SYSINFO_CPUINFO +GLIBTOP_MAX_SYSINFO +glibtop_sysinfo +glibtop_entry +glibtop_get_sysinfo_r +glibtop_get_sysinfo_s +glibtop_get_sysinfo +
+ +glibtop/union.h +
+union +glibtop_union +
+ +glibtop/version.h +
+version +LIBGTOP_VERSION_STRING +glibtop_send_version +
+ +glibtop/proclist.h +
+proclist +GLIBTOP_PROCLIST_NUMBER +GLIBTOP_PROCLIST_TOTAL +GLIBTOP_PROCLIST_SIZE +GLIBTOP_MAX_PROCLIST +GLIBTOP_KERN_PROC_ALL +GLIBTOP_KERN_PROC_PID +GLIBTOP_KERN_PROC_PGRP +GLIBTOP_KERN_PROC_SESSION +GLIBTOP_KERN_PROC_TTY +GLIBTOP_KERN_PROC_UID +GLIBTOP_KERN_PROC_RUID +GLIBTOP_KERN_PROC_MASK +GLIBTOP_EXCLUDE_IDLE +GLIBTOP_EXCLUDE_SYSTEM +GLIBTOP_EXCLUDE_NOTTY +glibtop_proclist +glibtop_get_proclist +glibtop_get_proclist_r +glibtop_get_proclist_l +glibtop_init_proclist_p +glibtop_get_proclist_p +glibtop_init_proclist_s +glibtop_get_proclist_s +
+ +glibtop/sem_limits.h +
+sem_limits +GLIBTOP_IPC_SEMMAP +GLIBTOP_IPC_SEMMNI +GLIBTOP_IPC_SEMMNS +GLIBTOP_IPC_SEMMNU +GLIBTOP_IPC_SEMMSL +GLIBTOP_IPC_SEMOPM +GLIBTOP_IPC_SEMUME +GLIBTOP_IPC_SEMUSZ +GLIBTOP_IPC_SEMVMX +GLIBTOP_IPC_SEMAEM +GLIBTOP_MAX_SEM_LIMITS +glibtop_sem_limits +glibtop_get_sem_limits +glibtop_get_sem_limits_r +glibtop_get_sem_limits_l +glibtop_init_sem_limits_p +glibtop_get_sem_limits_p +glibtop_init_sem_limits_s +glibtop_get_sem_limits_s +
+ +glibtop/prockernel.h +
+prockernel +GLIBTOP_PROC_KERNEL_K_FLAGS +GLIBTOP_PROC_KERNEL_MIN_FLT +GLIBTOP_PROC_KERNEL_MAJ_FLT +GLIBTOP_PROC_KERNEL_CMIN_FLT +GLIBTOP_PROC_KERNEL_CMAJ_FLT +GLIBTOP_PROC_KERNEL_KSTK_ESP +GLIBTOP_PROC_KERNEL_KSTK_EIP +GLIBTOP_PROC_KERNEL_NWCHAN +GLIBTOP_PROC_KERNEL_WCHAN +GLIBTOP_MAX_PROC_KERNEL +glibtop_proc_kernel +glibtop_get_proc_kernel +glibtop_get_proc_kernel_r +glibtop_get_proc_kernel_l +glibtop_init_proc_kernel_p +glibtop_get_proc_kernel_p +glibtop_init_proc_kernel_s +glibtop_get_proc_kernel_s +
+ +glibtop/fsusage.h +
+fsusage +GLIBTOP_FSUSAGE_BLOCKS +GLIBTOP_FSUSAGE_BFREE +GLIBTOP_FSUSAGE_BAVAIL +GLIBTOP_FSUSAGE_FILES +GLIBTOP_FSUSAGE_FFREE +GLIBTOP_FSUSAGE_BLOCK_SIZE +GLIBTOP_FSUSAGE_READ +GLIBTOP_FSUSAGE_WRITE +GLIBTOP_MAX_FSUSAGE +glibtop_fsusage +glibtop_get_fsusage +glibtop_get_fsusage_r +glibtop_get_fsusage_l +glibtop_get_fsusage_s +
+ +glibtop/loadavg.h +
+loadavg +GLIBTOP_LOADAVG_LOADAVG +GLIBTOP_LOADAVG_NR_RUNNING +GLIBTOP_LOADAVG_NR_TASKS +GLIBTOP_LOADAVG_LAST_PID +GLIBTOP_MAX_LOADAVG +glibtop_loadavg +glibtop_get_loadavg +glibtop_get_loadavg_r +glibtop_get_loadavg_l +glibtop_init_loadavg_p +glibtop_get_loadavg_p +glibtop_init_loadavg_s +glibtop_get_loadavg_s +
+ +glibtop/mem.h +
+mem +GLIBTOP_MEM_TOTAL +GLIBTOP_MEM_USED +GLIBTOP_MEM_FREE +GLIBTOP_MEM_SHARED +GLIBTOP_MEM_BUFFER +GLIBTOP_MEM_CACHED +GLIBTOP_MEM_USER +GLIBTOP_MEM_LOCKED +GLIBTOP_MAX_MEM +glibtop_mem +glibtop_get_mem +glibtop_get_mem_r +glibtop_get_mem_l +glibtop_init_mem_p +glibtop_get_mem_p +glibtop_init_mem_s +glibtop_get_mem_s +
+ +glibtop/mountlist.h +
+mountlist +GLIBTOP_MOUNTLIST_NUMBER +GLIBTOP_MOUNTLIST_TOTAL +GLIBTOP_MOUNTLIST_SIZE +GLIBTOP_MAX_MOUNTLIST +glibtop_mountentry +glibtop_mountlist +glibtop_get_mountlist +glibtop_get_mountlist_r +glibtop_get_mountlist_l +glibtop_get_mountlist_s +
+ +glibtop/msg_limits.h +
+msg_limits +GLIBTOP_IPC_MSGPOOL +GLIBTOP_IPC_MSGMAP +GLIBTOP_IPC_MSGMAX +GLIBTOP_IPC_MSGMNB +GLIBTOP_IPC_MSGMNI +GLIBTOP_IPC_MSGSSZ +GLIBTOP_IPC_MSGTQL +GLIBTOP_MAX_MSG_LIMITS +glibtop_msg_limits +glibtop_get_msg_limits +glibtop_get_msg_limits_r +glibtop_get_msg_limits_l +glibtop_init_msg_limits_p +glibtop_get_msg_limits_p +glibtop_init_msg_limits_s +glibtop_get_msg_limits_s +
+ +glibtop/cpu.h +
+cpu +GLIBTOP_CPU_TOTAL +GLIBTOP_CPU_USER +GLIBTOP_CPU_NICE +GLIBTOP_CPU_SYS +GLIBTOP_CPU_IDLE +GLIBTOP_CPU_FREQUENCY +GLIBTOP_XCPU_TOTAL +GLIBTOP_XCPU_USER +GLIBTOP_XCPU_NICE +GLIBTOP_XCPU_SYS +GLIBTOP_XCPU_IDLE +GLIBTOP_XCPU_FLAGS +GLIBTOP_CPU_IOWAIT +GLIBTOP_CPU_IRQ +GLIBTOP_CPU_SOFTIRQ +GLIBTOP_XCPU_IOWAIT +GLIBTOP_XCPU_IRQ +GLIBTOP_XCPU_SOFTIRQ +GLIBTOP_MAX_CPU +GLIBTOP_NCPU +glibtop_cpu +glibtop_get_cpu +glibtop_get_cpu_r +glibtop_get_cpu_l +glibtop_init_cpu_p +glibtop_get_cpu_p +glibtop_init_cpu_s +glibtop_get_cpu_s +
+ +glibtop/swap.h +
+swap +GLIBTOP_SWAP_TOTAL +GLIBTOP_SWAP_USED +GLIBTOP_SWAP_FREE +GLIBTOP_SWAP_PAGEIN +GLIBTOP_SWAP_PAGEOUT +GLIBTOP_MAX_SWAP +glibtop_swap +glibtop_get_swap +glibtop_get_swap_r +glibtop_get_swap_l +glibtop_init_swap_p +glibtop_get_swap_p +glibtop_init_swap_s +glibtop_get_swap_s +
+ diff --git a/doc/reference/version.xml.in b/doc/reference/version.xml.in new file mode 100644 index 00000000..927ab962 --- /dev/null +++ b/doc/reference/version.xml.in @@ -0,0 +1,4 @@ + + +@PACKAGE_VERSION@ diff --git a/gtk-doc.make b/gtk-doc.make new file mode 100644 index 00000000..eeb23b49 --- /dev/null +++ b/gtk-doc.make @@ -0,0 +1,155 @@ +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### + +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) +else +GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) +endif + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) + +EXTRA_DIST = \ + $(content_files) \ + $(HTML_IMAGES) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + +DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ + $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS) + +if ENABLE_GTK_DOC +all-local: html-build.stamp +else +all-local: +endif + +docs: html-build.stamp + +#### scan #### + +scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) + @echo 'gtk-doc: Scanning header files' + @-chmod -R u+w $(srcdir) + if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + else \ + cd $(srcdir) ; \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + cd $(srcdir) && \ + gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) + touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp + @true + +#### templates #### + +tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + @echo 'gtk-doc: Rebuilding template files' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +#### xml #### + +sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) + @echo 'gtk-doc: Building XML' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && \ + gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) + touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +#### html #### + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building HTML' + @-chmod -R u+w $(srcdir) + rm -rf $(srcdir)/html + mkdir $(srcdir)/html + cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) + @echo 'gtk-doc: Fixing cross-references' + cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + touch html-build.stamp + +############## + +clean-local: + rm -f *~ *.bak + rm -rf .libs + +maintainer-clean-local: clean + cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + +install-data-local: + installfiles=`echo $(srcdir)/html/*`; \ + if test "$$installfiles" = '$(srcdir)/html/*'; \ + then echo '-- Nothing to install' ; \ + else \ + $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ + for i in $$installfiles; do \ + echo '-- Installing '$$i ; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ + done; \ + echo '-- Installing $(srcdir)/html/index.sgml' ; \ + $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \ + fi + +uninstall-local: + rm -f $(DESTDIR)$(TARGET_DIR)/* + +# +# Require gtk-doc when making dist +# +if ENABLE_GTK_DOC +dist-check-gtkdoc: +else +dist-check-gtkdoc: + @echo "*** gtk-doc must be installed and enabled in order to make dist" + @false +endif + +dist-hook: dist-check-gtkdoc dist-hook-local + mkdir $(distdir)/tmpl + mkdir $(distdir)/xml + mkdir $(distdir)/html + -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl + -cp $(srcdir)/xml/*.xml $(distdir)/xml + -cp $(srcdir)/html/* $(distdir)/html + if test -f $(srcdir)/$(DOC_MODULE).types; then \ + cp $(srcdir)/$(DOC_MODULE).types $(distdir)/$(DOC_MODULE).types; \ + fi + +.PHONY : dist-hook-local docs diff --git a/sysdeps/common/default.c b/sysdeps/common/default.c index d8867405..ff734ec5 100644 --- a/sysdeps/common/default.c +++ b/sysdeps/common/default.c @@ -5,13 +5,40 @@ #include +/** + * glibtop_close: + * + * Close the connection to the server. + */ void glibtop_close(void) { glibtop_close_r(glibtop_global_server); } +/** + * SECTION:glibtop + * @short_description: Server initilization + * @stability: Stable + * + * You do not need to worry about the #glibtop * server structure if + * you don't need - the library exports a #glibtop_global_server + * which you can use everywhere a #glibtop * is expected. + * + * Most of the library and all of the sysdeps function also have an alias + * (which is the function name without the _l, + * _s or _r suffix) which don't + * take a #glibtop * as argument but uses the #glibtop_global_server + * instead. + */ +/** + * glibtop_init: + * + * Server initialization. + * + * Returns: A #glibtop reference. + */ glibtop* glibtop_init(void) { @@ -19,6 +46,17 @@ glibtop_init(void) } +/** + * glibtop_get_cpu: + * @buf: A location to return the CPU usage. + * + * Get the CPU usage. + * + * All CPU units are measured in jiffies which are normally + * 1/100th of a second (in which case frequency equals 100), + * but can also be in any other unit. To get seconds, divide them by + * frequency. + */ void glibtop_get_cpu(glibtop_cpu *buf) { @@ -26,6 +64,13 @@ glibtop_get_cpu(glibtop_cpu *buf) } +/** + * glibtop_get_fsusage: + * @buf: A location to return the file system usage. + * @mount_dir: mount dir where to get the information of usage. + * + * Get the file system usage for an specific @mount_dir. + */ void glibtop_get_fsusage(glibtop_fsusage *buf, const char *mount_dir) { @@ -33,6 +78,16 @@ glibtop_get_fsusage(glibtop_fsusage *buf, const char *mount_dir) } +/** + * glibtop_get_uptime: + * @buf: A location to return the system uptime + * + * When porting LibGTop to a new system, you only need to implement + * #uptime and #idletime if there's a faster or better way to obtain them + * as using function(glibtop_cpu) for it. Look at + * sysdeps/freebsd/uptime.c for an + * example on how to obtain them using function(glibtop_cpu). + */ void glibtop_get_uptime(glibtop_uptime *buf) { @@ -40,6 +95,11 @@ glibtop_get_uptime(glibtop_uptime *buf) } +/** + * glibtop_sysinfo: + * + * Returns: The system information through a #glibtop_sysinfo structure. + */ const glibtop_sysinfo * glibtop_get_sysinfo(void) { @@ -47,6 +107,12 @@ glibtop_get_sysinfo(void) } +/** + * glibtop_get_swap: + * @buf: A location to return a #glibtop_swap. + * + * Get the swap usage. + */ void glibtop_get_swap(glibtop_swap *buf) { @@ -54,6 +120,13 @@ glibtop_get_swap(glibtop_swap *buf) } +/** + * glibtop_get_proc_uid: + * @buf: A location to return a #glibtop_proc_uid + * @pid: Process id to get the user and tty information + * + * Get the process user id and tty information. + */ void glibtop_get_proc_uid(glibtop_proc_uid *buf, pid_t pid) { @@ -61,6 +134,20 @@ glibtop_get_proc_uid(glibtop_proc_uid *buf, pid_t pid) } +/** + * glibtop_get_proc_time: + * @buf: + * @pid: Process id to get the user and tty information + * + * Please note that under Linux, #start_time value may be strange. + * Linux kernel defines INITIAL_JIFFIES which implies a time + * shift. Because INITIAL_JIFFIES is not user-space defined, + * we cannot use it to compute accurate @code{start_time}. On Linux2.6, + * INITIAL_JIFFIES is 300 so start_time is + * always 3s different from real start time of the given process. You + * may also get shift results if your system clock is not synchronised + * with your hardware clock. See man hwclock. + */ void glibtop_get_proc_time(glibtop_proc_time *buf, pid_t pid) { @@ -138,20 +225,70 @@ glibtop_get_proc_kernel(glibtop_proc_kernel *buf, pid_t pid) } +/** + * SECTION:ppp + * @short_description: PPP Usage. + * @see_also: #libgtop-netload, #libgtop-netlist + * @stability: Stable + * + * Management of a PPP device. + */ + +/** + * glibtop_get_ppp: + * @buf: A location to return the PPP usage + * @short device: The device to ask information + * + * Get the PPP usage. + */ void glibtop_get_ppp(glibtop_ppp *buf, unsigned short device) { glibtop_get_ppp_l(glibtop_global_server, buf, device); } +/** + * SECTION:netlist + * @short_description: Network Devices List. + * @see_also: #libgtop-netload + * @stability: Stable + * + * The application class handles ... + */ +/** + * glibtop_get_nelist: + * @buf: + * + * Get the list of network devices. + * + * Returns: A list of network devices. + */ char** glibtop_get_netlist(glibtop_netlist *buf) { return glibtop_get_netlist_l(glibtop_global_server, buf); } +/** + * SECTION:netload + * @short_description: Network Load. + * @see_also: #libtop-netlist + * @stability: Stable + * + * The application class handles ... + */ + +/** + * glibtop_get_netload: + * @buf: The variable where the results will be assigned. + * @interface: The name of the network interface. + * + * Recolects network statistics for @interface + * (which is the same than in ifconfig). + * The values are returned into @buf. + */ void glibtop_get_netload(glibtop_netload *buf, const char *interface) { @@ -166,6 +303,13 @@ glibtop_get_mountlist(glibtop_mountlist *buf, int all_fs) } +/** + * glibtop_get_mem: + * @buf: Buffer where the output will be given. + * + * Get the memory usage. Unless explicitly stated otherwise, all memory + * units are in bytes. + */ void glibtop_get_mem(glibtop_mem *buf) {