1 | RELEASE NOTES FOR LIBGTOP 1.0 STABLE |
---|
2 | ==================================== |
---|
3 | |
---|
4 | OVERVIEW |
---|
5 | -------- |
---|
6 | |
---|
7 | LibGTop is a library that read information about processes and the |
---|
8 | running systems. This information include: |
---|
9 | |
---|
10 | General System Information: |
---|
11 | |
---|
12 | cpu - CPU Usage |
---|
13 | mem - Memory Usage |
---|
14 | swap - Swap Usage (including paging activity) |
---|
15 | loadavg - Load average (including nr_running, nr_tasks, last_pid) |
---|
16 | uptime - Uptime and Idle time, can be calculated from CPU usage |
---|
17 | |
---|
18 | SYS V IPC Limits: |
---|
19 | |
---|
20 | shm_limits - Shared Memory Limits |
---|
21 | msg_limits - Message Queue Limits |
---|
22 | sem_limits - Semaphore Set Limits |
---|
23 | |
---|
24 | Network: |
---|
25 | |
---|
26 | netload - Network load |
---|
27 | ppp - PPP statistics |
---|
28 | |
---|
29 | Process List: |
---|
30 | |
---|
31 | proclist - List of processes |
---|
32 | |
---|
33 | Process information: |
---|
34 | |
---|
35 | proc_state - cmd, state, uid, gid |
---|
36 | proc_uid - uid,euid,gid,egid,pid,ppid,pgrp |
---|
37 | session,tty,tpgid,priority,nice |
---|
38 | proc_mem - size,vsize,resident,share,rss,rss_rlim |
---|
39 | proc_time - start_time,rtime,utime,stime,cutime,cstime |
---|
40 | timeout,it_real_value,frequency |
---|
41 | proc_signal - signal,blocked,sigignore,sigcatch |
---|
42 | proc_kernel - k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt |
---|
43 | kstk_esp,kstk_eip,nwchan,wchan |
---|
44 | proc_segment - text_rss,shlib_rss,data_rss,stack_rss,dirty_size |
---|
45 | start_code,end_code,start_stack |
---|
46 | |
---|
47 | Process maps: |
---|
48 | |
---|
49 | proc_args - Command line arguments |
---|
50 | proc_map - Process map (/proc/<pid>/maps under Linux) |
---|
51 | |
---|
52 | File system usage: |
---|
53 | |
---|
54 | mountlist - List of currently mounted filesystems |
---|
55 | fsusage - File system usage |
---|
56 | |
---|
57 | PORTABILITY: |
---|
58 | ----------- |
---|
59 | |
---|
60 | LibGTop is designed to be as portable as possible. None of the |
---|
61 | functions and retrieved information should be specific to a specific |
---|
62 | operating system. So you only need to port the system dependent part |
---|
63 | of the library to a new system and all application programs can then |
---|
64 | use libgtop on this new system. |
---|
65 | |
---|
66 | CLIENT/SERVER MODEL: |
---|
67 | ------------------- |
---|
68 | |
---|
69 | Some systems like DEC OSF/1 or BSD require special privileges for the |
---|
70 | calling process to fetch the required information (SUID root/SGID |
---|
71 | kmem). To solve this problem, I designed a client/server model which |
---|
72 | makes a call to a SUID/SGID server which fetches the required |
---|
73 | information whenever it is required. This server is only called for |
---|
74 | features that really require privileges, otherwise the sysdeps code |
---|
75 | is called directory (every user can get the CPU usage on DEC OSF/1, |
---|
76 | but only root can get information about processes other than the |
---|
77 | current one). |
---|
78 | |
---|
79 | There is also some kind of daemon which can be used to fetch |
---|
80 | information from remote systems (still experimental). This daemon |
---|
81 | normally runs as nobody and calls the SUID/SGID itself when needed. |
---|
82 | |
---|
83 | LIBGTOP AND GNOME: |
---|
84 | ----------------- |
---|
85 | |
---|
86 | LibGTop is currently used in various places in the GNOME Project, |
---|
87 | for instance in some of the applets in gnome-core and - of cause - |
---|
88 | this ultra-cool application called GTop ... |
---|
89 | |
---|
90 | Although LibGTop is not specific to GNOME and under GPL license, I |
---|
91 | spent most my time during the last months to work in the GNOME project |
---|
92 | so this is the primary use for LibGTop (and currently the only one). |
---|
93 | |
---|
94 | However, you can also give its configure.in script the `--without-gnome' |
---|
95 | parameter and then use it fully without GNOME in your own applications. |
---|
96 | |
---|
97 | LIBGTOP AND GNOME - PART II: |
---|
98 | --------------------------- |
---|
99 | |
---|
100 | LibGTop was tested with FreeBSD 3.0 but it should also work with |
---|
101 | FreeBSD 2.2.7, NetBSD and OpenBSD. |
---|
102 | |
---|
103 | Currently my primary aim is to help the GNOME people with our 1.0 release |
---|
104 | so I won't have much time to test it with any other system than Linux. |
---|
105 | |
---|
106 | However, I consider FreeBSD, NetBSD and OpenBSD as supported systems for |
---|
107 | LibGTop and whenever I get bug reports I will do my best to fix them as |
---|
108 | quickly as possible. |
---|
109 | |
---|
110 | PLATFORM SPECIFIC NOTES FOR LINUX: |
---|
111 | ================================== |
---|
112 | |
---|
113 | Under Linux, LibGTop should work without problems and read everything |
---|
114 | from /proc. |
---|
115 | |
---|
116 | LibGTop 0.25 also had an experimental kernel interface to read this |
---|
117 | information directly from the kernel with a system call - but I have |
---|
118 | currently dropped support for this as I am too busy with GNOME |
---|
119 | development to keep current with kernel hacking. |
---|
120 | |
---|
121 | PLATFORM SPECIFIC NOTES FOR SOLARIS: |
---|
122 | ==================================== |
---|
123 | |
---|
124 | Since so many people were asking me about this: |
---|
125 | |
---|
126 | LibGTop currently does not have any support for Solaris, and it will |
---|
127 | never have until some volunteer writes the code for it. I can't do this |
---|
128 | myself since I do not have any machine to test it on. |
---|
129 | |
---|
130 | PLATFORM SPECIFIC NOTES FOR BSD: |
---|
131 | ================================= |
---|
132 | |
---|
133 | There are a few caveats: |
---|
134 | |
---|
135 | * You need to manually make the `$(prefix)/bin/libgtop_server' SGID to |
---|
136 | kmem after installation and mount the /proc file system of FreeBSD |
---|
137 | (/proc/<pid>/mem is used within kvm_uread ()). |
---|
138 | |
---|
139 | * To get the filenames of the process maps displayed in GTop, you need |
---|
140 | to configure with the `--with-libgtop-inodedb' option (you need GDBM |
---|
141 | for this to work). |
---|
142 | |
---|
143 | You have then to create an inode database which is used to look up |
---|
144 | filenames. This is done using the `mkinodedb' program which comes |
---|
145 | along with libgtop. |
---|
146 | |
---|
147 | See the file src/inodedb/README for details: |
---|
148 | |
---|
149 | The `mkinodedb' program which is build in this directory takes two |
---|
150 | command line arguments: the full pathname of the database to be |
---|
151 | created and the name of a configuration file consisting of directory |
---|
152 | and file names each on a line by itself - see `/etc/ld.so.conf' for |
---|
153 | an example. |
---|
154 | |
---|
155 | Putting a directory name in this file means all regular files found |
---|
156 | in this directory are included in the database, but it will not |
---|
157 | recursively descend into subdirectories (for instance, we want |
---|
158 | everything in `/usr/lib' but not every single file in `/usr/lib/sgml'). |
---|
159 | You can also use filenames to include a single file. |
---|
160 | |
---|
161 | Have fun, |
---|
162 | |
---|
163 | Martin <martin@home-of-linux.org> |
---|