diff --git a/ChangeLog b/ChangeLog index a2e26ef1..fd9e6aef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1998-08-11 Martin Baulig + + * guile/features.awk: New file. + * guile/make-docbook.scm: Improved automatical generation of + the documentation file `reference.sgml'. + * guile/reference.sgml: This file is automatically generated, + but many people have problems with it, so we add it to CVS. + 1998-08-10 Martin Baulig * include/glibtop/procmap.h (glibtop_proc_map): New file. diff --git a/guile/.cvsignore b/guile/.cvsignore index 467504cf..3dda7298 100644 --- a/guile/.cvsignore +++ b/guile/.cvsignore @@ -1,3 +1,2 @@ -reference.sgml Makefile.in Makefile diff --git a/guile/Makefile.am b/guile/Makefile.am index e75e37ec..7c1c9b40 100644 --- a/guile/Makefile.am +++ b/guile/Makefile.am @@ -45,7 +45,8 @@ libgtop_la_LIBADD = ../sysdeps/guile/guile.lo \ ../sysdeps/@sysdeps_dir@/open.lo \ ../sysdeps/@sysdeps_dir@/proctime.lo \ ../sysdeps/@sysdeps_dir@/prockernel.lo \ - ../sysdeps/@sysdeps_dir@/procuid.lo + ../sysdeps/@sysdeps_dir@/procuid.lo \ + ../sysdeps/@sysdeps_dir@/procmap.lo libnames_la_LIBADD = ../sysdeps/guile/names/guile-names.lo diff --git a/guile/features.awk b/guile/features.awk new file mode 100644 index 00000000..977503a7 --- /dev/null +++ b/guile/features.awk @@ -0,0 +1,61 @@ +BEGIN { + string = ""; + names = ""; +} + +function output(line) { + split (line, line_fields, /\|/); + retval = line_fields[1]; + feature = line_fields[2]; + param_def = line_fields[4]; + + orig = feature; sub(/^@/,"",feature); + space = feature; gsub(/./," ",space); + + if (string == "") + string = " '("; + else + string = string" "; + string = string"(\""feature"\" (\""retval"\""; + + feature_nounder = feature; + sub(/_/, "-", feature_nounder); + + if (names == "") + names = " '("; + else + names = names" "; + names = names"(\""feature"\" \""feature_nounder"\")\n"; + + nr_params = split (param_def, params, /:/); + for (param = 1; param <= nr_params; param++) { + list = params[param]; + type = params[param]; + sub(/\(.*/, "", type); + sub(/^\w+\(/, "", list); sub(/\)$/, "", list); + + string = string" (\""type"\""; + + count = split (list, fields, /,/); + for (field = 1; field <= count; field++) { + string = string" \""fields[field]"\""; + } + + string = string")"; + } + + string = string"))\n"; +} + +/^[^#]/ { output($0) } + + +END { + print "(define libgtop-features"; + print string" )"; + print ")\n"; + + print "(define libgtop-feature-names"; + print names" )"; + print ")\n"; +} diff --git a/guile/make-docbook.scm b/guile/make-docbook.scm index aae7542b..1ac5a871 100644 --- a/guile/make-docbook.scm +++ b/guile/make-docbook.scm @@ -1,12 +1,18 @@ ;; $Id$ +(load "features.scm") + (define sysdeps-list '()) +(define type-names '("void" + "int64_t" "u_int64_t" "double" + "int" "char" "const char *")) + (define make-sysdeps-list (lambda () - (letrec ((names (glibtop-names-sysdeps)) - (labels (glibtop-labels-sysdeps)) - (descriptions (glibtop-descriptions-sysdeps)) + (letrec ((names (cdr (glibtop-names-sysdeps))) + (labels (cdr (glibtop-labels-sysdeps))) + (descriptions (cdr (glibtop-descriptions-sysdeps))) ) (for-each (lambda (feature) (let* ((label (car labels)) @@ -31,11 +37,13 @@ (let* ((names (eval-string (string "(glibtop-names-" feature ")"))) (types (eval-string (string "(glibtop-types-" feature ")"))) (labels (eval-string (string "(glibtop-labels-" feature ")"))) - (sysdeps (assoc-ref sysdeps-list feature)) (retval "void") + (sysdeps (assoc-ref sysdeps-list feature)) + (retval (car (car (assoc-ref libgtop-features feature)))) (name (assoc-ref sysdeps 'name)) (label (assoc-ref sysdeps 'label)) (description (assoc-ref sysdeps 'description)) (descriptions (eval-string (string "(glibtop-descriptions-" feature ")"))) + (feature_nounder (car (assoc-ref libgtop-feature-names feature))) (decl-list '()) (field-list '()) (synopsis-start-string @@ -73,14 +81,43 @@ (funcdef-string (string "" retval " " - "glibtop_get_" feature "__r" + "glibtop_get_" feature "_l" "\n") ) (paramdef-string - (string "glibtop *server, " - "glibtop_" feature " *" feature "\n" - "") + (lambda () + (let ((start (string "glibtop *" + "server, glibtop_" + feature " *" feature + "") + ) + (param_string (string)) + (end (string "\n")) + (param_lists + (cdr (car (assoc-ref libgtop-features feature)))) + ) + (for-each + (lambda (x) + (let ((type (car x)) + (params (cdr x)) + ) + (for-each + (lambda (param) + (set! param_string (string param_string + ", " type + " " + param + "" + ) + ) + ) + params) + ) + ) + param_lists) + (string start param_string end)) + ) ) (funcdef-noserver-string @@ -163,6 +200,7 @@ (lambda (x) (set! new-type (car type-list)) (set! type-list (cdr type-list)) + (set! new-type (list-ref type-names new-type)) (if (equal? old-type new-type) (set-car! fields (append (list new-type) @@ -213,8 +251,8 @@ (string "typedef struct _glibtop_" name) 5) (string "glibtop_" name ";\n\n" - "struct glibtop_" name "\n{\n\t" - "unsigned long\tflags;\n") + "struct _glibtop_" name "\n{\n\t" + "u_int64_t\tflags;\n") ) ) ) @@ -269,7 +307,7 @@ (string "\n") (string "\n") funcdef-string - paramdef-string + (paramdef-string) (string "\n\n") definition-start-string (string "
\n\n") @@ -279,6 +317,7 @@ "\n\n" (make-param-description) "\n\n" + "&include-" feature_nounder ".sgml;\n\n" ) ) ) @@ -299,13 +338,9 @@ (begin (make-sysdeps-list) - - (display (string "\n" - "Function Reference List\n\n") - ) - + (for-each (lambda (x) (display (make-function-reference x)) ) - (glibtop-names-sysdeps)) + (cdr (glibtop-names-sysdeps))) ) diff --git a/guile/reference.sgml b/guile/reference.sgml new file mode 100644 index 00000000..bbf8403b --- /dev/null +++ b/guile/reference.sgml @@ -0,0 +1,1752 @@ + +<function>glibtop_get_cpu()</function> - CPU Usage + + +Automatically generated description: + +
+ +CPU Usage + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/cpu.h>void glibtop_get_cpu +glibtop_cpu *cpu + + +void glibtop_get_cpu_l +glibtop *server, glibtop_cpu *cpu + +
+Automatically generated declaration of _glibtop_cpu: + +
+ +typedef struct _glibtop_cpu glibtop_cpu; + +struct _glibtop_cpu +{ + u_int64_t flags; + u_int64_t total, /* GLIBTOP_CPU_TOTAL */ + user, /* GLIBTOP_CPU_USER */ + nice, /* GLIBTOP_CPU_NICE */ + sys, /* GLIBTOP_CPU_SYS */ + idle, /* GLIBTOP_CPU_IDLE */ + frequency; /* GLIBTOP_CPU_FREQUENCY */ +}; + +
+Automatically generated descriptions of _glibtop_cpu: + + + + +total + + + +The number of jiffies (1/100ths of a second) since system boot + + +user + + + +The number of jiffies (1/100ths of a second) that the system spent in user mode + + +nice + + + +The number of jiffies (1/100ths of a second) that the system spent in user mode with low priority (nice) + + +sys + + + +The number of jiffies (1/100ths of a second) that the system spent in system mode + + +idle + + + +The number of jiffies (1/100ths of a second) that the system spend in the idle task + + +frequency + + + +All of the above values are in jiffies (1/100ths of a second) unless otherwise stated in this field (i.e. 'frequency != 100') + + + +&include-cpu.sgml; + + +<function>glibtop_get_mem()</function> - Memory Usage + + +Automatically generated description: + +
+ +Memory Usage + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/mem.h>void glibtop_get_mem +glibtop_mem *mem + + +void glibtop_get_mem_l +glibtop *server, glibtop_mem *mem + +
+Automatically generated declaration of _glibtop_mem: + +
+ +typedef struct _glibtop_mem glibtop_mem; + +struct _glibtop_mem +{ + u_int64_t flags; + u_int64_t total, /* GLIBTOP_MEM_TOTAL */ + used, /* GLIBTOP_MEM_USED */ + free, /* GLIBTOP_MEM_FREE */ + shared, /* GLIBTOP_MEM_SHARED */ + buffer, /* GLIBTOP_MEM_BUFFER */ + cached, /* GLIBTOP_MEM_CACHED */ + user, /* GLIBTOP_MEM_USER */ + locked; /* GLIBTOP_MEM_LOCKED */ +}; + +
+Automatically generated descriptions of _glibtop_mem: + + + + +total + + + +Total physical memory in kB + + +used + + + +Used memory size in kB + + +free + + + +Free memory size in kB + + +shared + + + +Shared memory size in kB + + +buffer + + + +Size of buffers kB + + +cached + + + +Size of cached memory in kB + + +user + + + +Memory used from user processes in kB + + +locked + + + +Memory in locked pages in kB + + + +&include-mem.sgml; + + +<function>glibtop_get_swap()</function> - Swap Usage + + +Automatically generated description: + +
+ +Swap Usage + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/swap.h>void glibtop_get_swap +glibtop_swap *swap + + +void glibtop_get_swap_l +glibtop *server, glibtop_swap *swap + +
+Automatically generated declaration of _glibtop_swap: + +
+ +typedef struct _glibtop_swap glibtop_swap; + +struct _glibtop_swap +{ + u_int64_t flags; + u_int64_t total, /* GLIBTOP_SWAP_TOTAL */ + used, /* GLIBTOP_SWAP_USED */ + free, /* GLIBTOP_SWAP_FREE */ + pagein, /* GLIBTOP_SWAP_PAGEIN */ + pageout; /* GLIBTOP_SWAP_PAGEOUT */ +}; + +
+Automatically generated descriptions of _glibtop_swap: + + + + +total + + + +Total Swap Space + + +used + + + +Used Swap Space + + +free + + + +Free Swap Space + + +pagein + + + +Total number of swap pages that have been brought in + + +pageout + + + +Total number of swap pages that have been brought out + + + +&include-swap.sgml; + + +<function>glibtop_get_uptime()</function> - System Uptime + + +Automatically generated description: + +
+ +System Uptime + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/uptime.h>void glibtop_get_uptime +glibtop_uptime *uptime + + +void glibtop_get_uptime_l +glibtop *server, glibtop_uptime *uptime + +
+Automatically generated declaration of _glibtop_uptime: + +
+ +typedef struct _glibtop_uptime glibtop_uptime; + +struct _glibtop_uptime +{ + u_int64_t flags; + double uptime, /* GLIBTOP_UPTIME_UPTIME */ + idletime; /* GLIBTOP_UPTIME_IDLETIME */ +}; + +
+Automatically generated descriptions of _glibtop_uptime: + + + + +uptime + + + +Time in seconds since system boot + + +idletime + + + +Time in seconds the system spent in the idle task since system boot + + + +&include-uptime.sgml; + + +<function>glibtop_get_loadavg()</function> - Load Averange + + +Automatically generated description: + +
+ +Load Averange + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/loadavg.h>void glibtop_get_loadavg +glibtop_loadavg *loadavg + + +void glibtop_get_loadavg_l +glibtop *server, glibtop_loadavg *loadavg + +
+Automatically generated declaration of _glibtop_loadavg: + +
+ +typedef struct _glibtop_loadavg glibtop_loadavg; + +struct _glibtop_loadavg +{ + u_int64_t flags; + double loadavg; /* GLIBTOP_LOADAVG_LOADAVG */ +}; + +
+Automatically generated descriptions of _glibtop_loadavg: + + + + +loadavg + + + +Number of jobs running simultaneously averaged over 1, 5 and 15 minutes + + + +&include-loadavg.sgml; + + +<function>glibtop_get_shm_limits()</function> - Shared Memory Limits + + +Automatically generated description: + +
+ +Shared Memory Limits + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/shm_limits.h>void glibtop_get_shm_limits +glibtop_shm_limits *shm_limits + + +void glibtop_get_shm_limits_l +glibtop *server, glibtop_shm_limits *shm_limits + +
+Automatically generated declaration of _glibtop_shm_limits: + +
+ +typedef struct _glibtop_shm_limits glibtop_shm_limits; + +struct _glibtop_shm_limits +{ + u_int64_t flags; + u_int64_t shmmax, /* GLIBTOP_SHM_LIMITS_SHMMAX */ + shmmin, /* GLIBTOP_SHM_LIMITS_SHMMIN */ + shmmni, /* GLIBTOP_SHM_LIMITS_SHMMNI */ + shmseg, /* GLIBTOP_SHM_LIMITS_SHMSEG */ + shmall; /* GLIBTOP_SHM_LIMITS_SHMALL */ +}; + +
+Automatically generated descriptions of _glibtop_shm_limits: + + + + +shmmax + + + +Max segment size + + +shmmin + + + +Min segment size + + +shmmni + + + +Max number of segments + + +shmseg + + + +Max shared segments per process + + +shmall + + + +Max total shared memory + + + +&include-shm-limits.sgml; + + +<function>glibtop_get_msg_limits()</function> - Message Queue Limits + + +Automatically generated description: + +
+ +Message Queue Limits + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/msg_limits.h>void glibtop_get_msg_limits +glibtop_msg_limits *msg_limits + + +void glibtop_get_msg_limits_l +glibtop *server, glibtop_msg_limits *msg_limits + +
+Automatically generated declaration of _glibtop_msg_limits: + +
+ +typedef struct _glibtop_msg_limits glibtop_msg_limits; + +struct _glibtop_msg_limits +{ + u_int64_t flags; + u_int64_t msgpool, /* GLIBTOP_MSG_LIMITS_MSGPOOL */ + msgmap, /* GLIBTOP_MSG_LIMITS_MSGMAP */ + msgmax, /* GLIBTOP_MSG_LIMITS_MSGMAX */ + msgmnb, /* GLIBTOP_MSG_LIMITS_MSGMNB */ + msgmni, /* GLIBTOP_MSG_LIMITS_MSGMNI */ + msgssz, /* GLIBTOP_MSG_LIMITS_MSGSSZ */ + msgtql; /* GLIBTOP_MSG_LIMITS_MSGTQL */ +}; + +
+Automatically generated descriptions of _glibtop_msg_limits: + + + + +msgpool + + + +Size in kilobytes of message pool + + +msgmap + + + +Number of entries in message map + + +msgmax + + + +Max size of message + + +msgmnb + + + +Default max size of queue + + +msgmni + + + +Max queues system wide + + +msgssz + + + +Message segment size + + +msgtql + + + +Number of system message headers + + + +&include-msg-limits.sgml; + + +<function>glibtop_get_sem_limits()</function> - Semaphore Set Limits + + +Automatically generated description: + +
+ +Semaphore Set Limits + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/sem_limits.h>void glibtop_get_sem_limits +glibtop_sem_limits *sem_limits + + +void glibtop_get_sem_limits_l +glibtop *server, glibtop_sem_limits *sem_limits + +
+Automatically generated declaration of _glibtop_sem_limits: + +
+ +typedef struct _glibtop_sem_limits glibtop_sem_limits; + +struct _glibtop_sem_limits +{ + u_int64_t flags; + u_int64_t semmap, /* GLIBTOP_SEM_LIMITS_SEMMAP */ + semmni, /* GLIBTOP_SEM_LIMITS_SEMMNI */ + semmns, /* GLIBTOP_SEM_LIMITS_SEMMNS */ + semmnu, /* GLIBTOP_SEM_LIMITS_SEMMNU */ + semmsl, /* GLIBTOP_SEM_LIMITS_SEMMSL */ + semopm, /* GLIBTOP_SEM_LIMITS_SEMOPM */ + semume, /* GLIBTOP_SEM_LIMITS_SEMUME */ + semusz, /* GLIBTOP_SEM_LIMITS_SEMUSZ */ + semvmx, /* GLIBTOP_SEM_LIMITS_SEMVMX */ + semaem; /* GLIBTOP_SEM_LIMITS_SEMAEM */ +}; + +
+Automatically generated descriptions of _glibtop_sem_limits: + + + + +semmap + + + +Number of entries in semaphore map + + +semmni + + + +Max number of arrays + + +semmns + + + +Max semaphores system wide + + +semmnu + + + +Number of undo structures system wide + + +semmsl + + + +Max semaphores per array + + +semopm + + + +Max ops per semop call + + +semume + + + +Max number of undo entries per process + + +semusz + + + +sizeof struct sem_undo + + +semvmx + + + +Semaphore max value + + +semaem + + + +Adjust on exit max value + + + +&include-sem-limits.sgml; + + +<function>glibtop_get_proclist()</function> - List of running Processes + + +Automatically generated description: + +
+ +List of running Processes + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/proclist.h>unsigned * glibtop_get_proclist +glibtop_proclist *proclist + + +unsigned * glibtop_get_proclist_l +glibtop *server, glibtop_proclist *proclist, long which, long arg + +
+Automatically generated declaration of _glibtop_proclist: + +
+ +typedef struct _glibtop_proclist glibtop_proclist; + +struct _glibtop_proclist +{ + u_int64_t flags; + u_int64_t number, /* GLIBTOP_PROCLIST_NUMBER */ + total, /* GLIBTOP_PROCLIST_TOTAL */ + size; /* GLIBTOP_PROCLIST_SIZE */ +}; + +
+Automatically generated descriptions of _glibtop_proclist: + + + + +number + + + +Number of list elements + + +total + + + +Total size of list + + +size + + + +Size of a single list element + + + +&include-proclist.sgml; + + +<function>glibtop_get_proc_state()</function> - Process Status information + + +Automatically generated description: + +
+ +Process Status information + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/proc_state.h>void glibtop_get_proc_state +glibtop_proc_state *proc_state + + +void glibtop_get_proc_state_l +glibtop *server, glibtop_proc_state *proc_state, pid_t pid + +
+Automatically generated declaration of _glibtop_proc_state: + +
+ +typedef struct _glibtop_proc_state glibtop_proc_state; + +struct _glibtop_proc_state +{ + u_int64_t flags; + int uid, /* GLIBTOP_PROC_STATE_UID */ + gid; /* GLIBTOP_PROC_STATE_GID */ + char state; /* GLIBTOP_PROC_STATE_STATE */ + const char * cmd; /* GLIBTOP_PROC_STATE_CMD */ +}; + +
+Automatically generated descriptions of _glibtop_proc_state: + + + + +cmd + + + +Basename of executable file in call to exec() + + +state + + + +Single-Char code for process state (S=sleeping) + + +uid + + + +UID of process + + +gid + + + +GID of process + + + +&include-proc-state.sgml; + + +<function>glibtop_get_proc_uid()</function> - Process UID and TTY information + + +Automatically generated description: + +
+ +Process UID and TTY information + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/proc_uid.h>void glibtop_get_proc_uid +glibtop_proc_uid *proc_uid + + +void glibtop_get_proc_uid_l +glibtop *server, glibtop_proc_uid *proc_uid, pid_t pid + +
+Automatically generated declaration of _glibtop_proc_uid: + +
+ +typedef struct _glibtop_proc_uid glibtop_proc_uid; + +struct _glibtop_proc_uid +{ + u_int64_t flags; + int uid, /* GLIBTOP_PROC_UID_UID */ + euid, /* GLIBTOP_PROC_UID_EUID */ + gid, /* GLIBTOP_PROC_UID_GID */ + egid, /* GLIBTOP_PROC_UID_EGID */ + pid, /* GLIBTOP_PROC_UID_PID */ + ppid, /* GLIBTOP_PROC_UID_PPID */ + pgrp, /* GLIBTOP_PROC_UID_PGRP */ + session, /* GLIBTOP_PROC_UID_SESSION */ + tty, /* GLIBTOP_PROC_UID_TTY */ + tpgid, /* GLIBTOP_PROC_UID_TPGID */ + priority, /* GLIBTOP_PROC_UID_PRIORITY */ + nice; /* GLIBTOP_PROC_UID_NICE */ +}; + +
+Automatically generated descriptions of _glibtop_proc_uid: + + + + +uid + + + +User ID + + +euid + + + +Effective User ID + + +gid + + + +Group ID + + +egid + + + +Effective Group ID + + +pid + + + +Process ID + + +ppid + + + +PID of parent process + + +pgrp + + + +Process group ID + + +session + + + +Session ID + + +tty + + + +Full device number of controlling terminal + + +tpgid + + + +Terminal process group ID + + +priority + + + +Kernel scheduling priority + + +nice + + + +Standard unix nice level of process + + + +&include-proc-uid.sgml; + + +<function>glibtop_get_proc_mem()</function> - Process Memory information + + +Automatically generated description: + +
+ +Process Memory information + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/proc_mem.h>void glibtop_get_proc_mem +glibtop_proc_mem *proc_mem + + +void glibtop_get_proc_mem_l +glibtop *server, glibtop_proc_mem *proc_mem, pid_t pid + +
+Automatically generated declaration of _glibtop_proc_mem: + +
+ +typedef struct _glibtop_proc_mem glibtop_proc_mem; + +struct _glibtop_proc_mem +{ + u_int64_t flags; + int64_t size, /* GLIBTOP_PROC_MEM_SIZE */ + vsize, /* GLIBTOP_PROC_MEM_VSIZE */ + resident, /* GLIBTOP_PROC_MEM_RESIDENT */ + share, /* GLIBTOP_PROC_MEM_SHARE */ + rss, /* GLIBTOP_PROC_MEM_RSS */ + rss_rlim; /* GLIBTOP_PROC_MEM_RSS_RLIM */ +}; + +
+Automatically generated descriptions of _glibtop_proc_mem: + + + + +size + + + +Total # of pages of memory + + +vsize + + + +Number of pages of virtual memory + + +resident + + + +Number of residnet set (non-swapped) pages + + +share + + + +Number of pages of shared (mmap'd) memory + + +rss + + + +Number of pages the process has in real memory, minus 3 for administrative purposes. This is just the pages which count towards text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out. + + +rss_rlim + + + +Current limit in bytes on the rss of the process (usually 2,147,483,647). + + + +&include-proc-mem.sgml; + + +<function>glibtop_get_proc_time()</function> - Process Time information + + +Automatically generated description: + +
+ +Process Time information + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/proc_time.h>void glibtop_get_proc_time +glibtop_proc_time *proc_time + + +void glibtop_get_proc_time_l +glibtop *server, glibtop_proc_time *proc_time, pid_t pid + +
+Automatically generated declaration of _glibtop_proc_time: + +
+ +typedef struct _glibtop_proc_time glibtop_proc_time; + +struct _glibtop_proc_time +{ + u_int64_t flags; + int64_t start_time, /* GLIBTOP_PROC_TIME_START_TIME */ + rtime, /* GLIBTOP_PROC_TIME_RTIME */ + utime, /* GLIBTOP_PROC_TIME_UTIME */ + stime, /* GLIBTOP_PROC_TIME_STIME */ + cutime, /* GLIBTOP_PROC_TIME_CUTIME */ + cstime, /* GLIBTOP_PROC_TIME_CSTIME */ + timeout, /* GLIBTOP_PROC_TIME_TIMEOUT */ + it_real_value, /* GLIBTOP_PROC_TIME_IT_REAL_VALUE */ + timeout; /* GLIBTOP_PROC_TIME_TIMEOUT */ +}; + +
+Automatically generated descriptions of _glibtop_proc_time: + + + + +start_time + + + +Start time of process in seconds since the epoch + + +rtime + + + +Read time accumulated by process (should be utime + stime) + + +utime + + + +user-mode CPU time accumulated by process + + +stime + + + +kernel-mode CPU time accumulated by process + + +cutime + + + +cumulative utime of process and reaped children + + +cstime + + + +cumulative stime of process and reaped children + + +timeout + + + +The time (in jiffies) of the process's next timeout + + +it_real_value + + + +The time (in jiffies) before the next SIGALRM is sent to the process due to an interval timer. + + +timeout + + + +Tick frequency + + + +&include-proc-time.sgml; + + +<function>glibtop_get_proc_signal()</function> - Process Signal information + + +Automatically generated description: + +
+ +Process Signal information + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/proc_signal.h>void glibtop_get_proc_signal +glibtop_proc_signal *proc_signal + + +void glibtop_get_proc_signal_l +glibtop *server, glibtop_proc_signal *proc_signal, pid_t pid + +
+Automatically generated declaration of _glibtop_proc_signal: + +
+ +typedef struct _glibtop_proc_signal glibtop_proc_signal; + +struct _glibtop_proc_signal +{ + u_int64_t flags; + int signal, /* GLIBTOP_PROC_SIGNAL_SIGNAL */ + blocked, /* GLIBTOP_PROC_SIGNAL_BLOCKED */ + sigignore, /* GLIBTOP_PROC_SIGNAL_SIGIGNORE */ + sigcatch; /* GLIBTOP_PROC_SIGNAL_SIGCATCH */ +}; + +
+Automatically generated descriptions of _glibtop_proc_signal: + + + + +signal + + + +Mask of pending signals + + +blocked + + + +Mask of blocked signals + + +sigignore + + + +Mask of ignored signals + + +sigcatch + + + +Mask of caught signals + + + +&include-proc-signal.sgml; + + +<function>glibtop_get_proc_kernel()</function> - Process Kernel Data information + + +Automatically generated description: + +
+ +Process Kernel Data information + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/proc_kernel.h>void glibtop_get_proc_kernel +glibtop_proc_kernel *proc_kernel + + +void glibtop_get_proc_kernel_l +glibtop *server, glibtop_proc_kernel *proc_kernel, pid_t pid + +
+Automatically generated declaration of _glibtop_proc_kernel: + +
+ +typedef struct _glibtop_proc_kernel glibtop_proc_kernel; + +struct _glibtop_proc_kernel +{ + u_int64_t flags; + const char * wchan; /* GLIBTOP_PROC_KERNEL_WCHAN */ + u_int64_t k_flags, /* GLIBTOP_PROC_KERNEL_K_FLAGS */ + min_flt, /* GLIBTOP_PROC_KERNEL_MIN_FLT */ + maj_flt, /* GLIBTOP_PROC_KERNEL_MAJ_FLT */ + cmin_flt, /* GLIBTOP_PROC_KERNEL_CMIN_FLT */ + cmaj_flt, /* GLIBTOP_PROC_KERNEL_CMAJ_FLT */ + kstk_esp, /* GLIBTOP_PROC_KERNEL_KSTK_ESP */ + kstk_eip, /* GLIBTOP_PROC_KERNEL_KSTK_EIP */ + nwchan; /* GLIBTOP_PROC_KERNEL_NWCHAN */ +}; + +
+Automatically generated descriptions of _glibtop_proc_kernel: + + + + +k_flags + + + +Kernel flags of the process. + +On Linux, currently every flag has the math bit set, because crt0.s checks for math emulation, so this is not included in the output. + +This is probably a bug, as not every process is a compiled C program. + +The math bit should be a decimal 4, and the traced bit is decimal 10. + + +min_flt + + + +The number of minor faults the process has made, those which have not required loading a memory page from disk. + + +maj_flt + + + +The number of major faults the process has made, those which have required loading a memory page from disk. + + +cmin_flt + + + +The number of minor faults that the process and its children have made. + + +cmaj_flt + + + +The number of major faults that the process and its children have made. + + +kstk_esp + + + +The current value of esp (32-bit stack pointer), as found in the kernel stack page for the process. + + +kstk_eip + + + +The current EIP (32-bit instruction pointer). + + +nwchan + + + +This is the "channel" in which the process is waiting. This is the address of a system call, and can be looked up in a namelist if you need a textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to see the WCHAN field in action) + + +wchan + + + +This is the textual name of the `nwchan' field. + + + +&include-proc-kernel.sgml; + + +<function>glibtop_get_proc_segment()</function> - Process Segment information + + +Automatically generated description: + +
+ +Process Segment information + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/proc_segment.h>void glibtop_get_proc_segment +glibtop_proc_segment *proc_segment + + +void glibtop_get_proc_segment_l +glibtop *server, glibtop_proc_segment *proc_segment, pid_t pid + +
+Automatically generated declaration of _glibtop_proc_segment: + +
+ +typedef struct _glibtop_proc_segment glibtop_proc_segment; + +struct _glibtop_proc_segment +{ + u_int64_t flags; + u_int64_t start_code, /* GLIBTOP_PROC_SEGMENT_START_CODE */ + end_code, /* GLIBTOP_PROC_SEGMENT_END_CODE */ + start_stack; /* GLIBTOP_PROC_SEGMENT_START_STACK */ + int64_t trs, /* GLIBTOP_PROC_SEGMENT_TRS */ + lrs, /* GLIBTOP_PROC_SEGMENT_LRS */ + drs, /* GLIBTOP_PROC_SEGMENT_DRS */ + dt; /* GLIBTOP_PROC_SEGMENT_DT */ +}; + +
+Automatically generated descriptions of _glibtop_proc_segment: + + + + +trs + + + +Text resident set size + + +lrs + + + +Shared-Lib resident set size + + +drs + + + +Data resident set size + + +dt + + + +Dirty pages + + +start_code + + + +Address of beginning of code segment + + +end_code + + + +Address of end of code segment + + +start_stack + + + +Address of the bottom of stack segment + + + +&include-proc-segment.sgml; + + +<function>glibtop_get_proc_map()</function> - Process Memory Map + + +Automatically generated description: + +
+ +Process Memory Map + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/proc_map.h>glibtop_map_entry * glibtop_get_proc_map +glibtop_proc_map *proc_map + + +glibtop_map_entry * glibtop_get_proc_map_l +glibtop *server, glibtop_proc_map *proc_map, pid_t pid + +
+Automatically generated declaration of _glibtop_proc_map: + +
+ +typedef struct _glibtop_proc_map glibtop_proc_map; + +struct _glibtop_proc_map +{ + u_int64_t flags; + u_int64_t number, /* GLIBTOP_PROC_MAP_NUMBER */ + total, /* GLIBTOP_PROC_MAP_TOTAL */ + size; /* GLIBTOP_PROC_MAP_SIZE */ +}; + +
+Automatically generated descriptions of _glibtop_proc_map: + + + + +number + + + +Number of list elements + + +total + + + +Total size of list + + +size + + + +Size of a single list element + + + +&include-proc-map.sgml; + + +<function>glibtop_get_mountlist()</function> - Mount List + + +Automatically generated description: + +
+ +List of currently mounted filesystems + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/mountlist.h>glibtop_mountentry * glibtop_get_mountlist +glibtop_mountlist *mountlist + + +glibtop_mountentry * glibtop_get_mountlist_l +glibtop *server, glibtop_mountlist *mountlist, pid_t all_fs + +
+Automatically generated declaration of _glibtop_mountlist: + +
+ +typedef struct _glibtop_mountlist glibtop_mountlist; + +struct _glibtop_mountlist +{ + u_int64_t flags; + u_int64_t number, /* GLIBTOP_MOUNTLIST_NUMBER */ + total, /* GLIBTOP_MOUNTLIST_TOTAL */ + size; /* GLIBTOP_MOUNTLIST_SIZE */ +}; + +
+Automatically generated descriptions of _glibtop_mountlist: + + + + +number + + + +Number of list elements + + +total + + + +Total size of list + + +size + + + +Size of a single list element + + + +&include-mountlist.sgml; + + +<function>glibtop_get_fsusage()</function> - File System Usage + + +Automatically generated description: + +
+ +File System Usage + +
+ +Automatically generated function synopsis: + +
+ + +#include <glibtop.h> +#include <glibtop/fsusage.h>void glibtop_get_fsusage +glibtop_fsusage *fsusage + + +void glibtop_get_fsusage_l +glibtop *server, glibtop_fsusage *fsusage, string string + +
+Automatically generated declaration of _glibtop_fsusage: + +
+ +typedef struct _glibtop_fsusage glibtop_fsusage; + +struct _glibtop_fsusage +{ + u_int64_t flags; + u_int64_t blocks, /* GLIBTOP_FSUSAGE_BLOCKS */ + bfree, /* GLIBTOP_FSUSAGE_BFREE */ + bavail, /* GLIBTOP_FSUSAGE_BAVAIL */ + files, /* GLIBTOP_FSUSAGE_FILES */ + ffree; /* GLIBTOP_FSUSAGE_FFREE */ +}; + +
+Automatically generated descriptions of _glibtop_fsusage: + + + + +blocks + + + +Total blocks + + +bfree + + + +Free blocks available to the superuser + + +bavail + + + +Free blocks available to non-superusers + + +files + + + +Total file nodes + + +ffree + + + +Free file nodes + + + +&include-fsusage.sgml; +