1 | RELEASE NOTES FOR LIBGTOP 1.0.7 |
---|
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 | Although LibGTop is part of the GNOME desktop environment, its main |
---|
87 | interface is totally independent from any particular desktop environment, |
---|
88 | so you can also use it as a standalone library in any piece of GPLed |
---|
89 | software which makes it also a valuable part of the GNU project. |
---|
90 | |
---|
91 | LibGTop is currently used in various places in the GNOME Project, |
---|
92 | for instance in some of the applets in gnome-core and - of cause - |
---|
93 | this ultra-cool application called GTop ... |
---|
94 | |
---|
95 | However, you need to give the configure.in script the `--without-gnome' |
---|
96 | parameter when you want to use LibGTop without GNOME (this is because, |
---|
97 | if you want to use it with GNOME, you need to compile it after the main |
---|
98 | GNOME libraries and I wanted to avoid getting unnecessary bug reports |
---|
99 | about this). |
---|
100 | |
---|
101 | LIBGTOP AND GNOME - PART II: |
---|
102 | --------------------------- |
---|
103 | |
---|
104 | LibGTop was tested with FreeBSD 3.0 but it should also work with |
---|
105 | FreeBSD 2.2.7, NetBSD and OpenBSD. |
---|
106 | |
---|
107 | Unfortunately, I don't have the power and disk space to install all |
---|
108 | possible operating systems out there on my machine and test things myself, |
---|
109 | so I depend on people telling me whether it works and sending me bug |
---|
110 | reports and patches if not. |
---|
111 | |
---|
112 | However, I consider FreeBSD, NetBSD and OpenBSD as supported systems for |
---|
113 | LibGTop and whenever I get bug reports I will do my best to fix them as |
---|
114 | quickly as possible. |
---|
115 | |
---|
116 | PLATFORM SPECIFIC NOTES FOR LINUX: |
---|
117 | ================================== |
---|
118 | |
---|
119 | [I am speaking of the Linux kernel here.] |
---|
120 | |
---|
121 | Under Linux, LibGTop should work without problems and read everything |
---|
122 | from /proc. |
---|
123 | |
---|
124 | LibGTop 0.25 also had an experimental kernel interface to read this |
---|
125 | information directly from the kernel with a system call - but I have |
---|
126 | currently dropped support for this as I am too busy with GNOME |
---|
127 | development to keep current with kernel hacking. |
---|
128 | |
---|
129 | PLATFORM SPECIFIC NOTES FOR SOLARIS: |
---|
130 | ==================================== |
---|
131 | |
---|
132 | The development branch of LibGTop (the 1.1.x series) has a first version |
---|
133 | of the Solaris port which works at least on Solaris 7. |
---|
134 | |
---|
135 | If you are on a Solaris system and want to give it a try, just fetch the |
---|
136 | latest 1.1.x tarball from ftp://ftp.home-of-linux.org/pub/libgtop/1.1/ |
---|
137 | and try it out. |
---|
138 | |
---|
139 | PLATFORM SPECIFIC NOTES FOR BSD: |
---|
140 | ================================= |
---|
141 | |
---|
142 | There are a few caveats: |
---|
143 | |
---|
144 | * You need to manually make the `$(prefix)/bin/libgtop_server' SGID to |
---|
145 | kmem after installation and mount the /proc file system of FreeBSD |
---|
146 | (/proc/<pid>/mem is used within kvm_uread ()). |
---|
147 | |
---|
148 | * To get the filenames of the process maps displayed in GTop, you need |
---|
149 | to configure with the `--with-libgtop-inodedb' option (you need GDBM |
---|
150 | for this to work). |
---|
151 | |
---|
152 | You have then to create an inode database which is used to look up |
---|
153 | filenames. This is done using the `mkinodedb' program which comes |
---|
154 | along with libgtop. |
---|
155 | |
---|
156 | See the file src/inodedb/README for details: |
---|
157 | |
---|
158 | The `mkinodedb' program which is build in this directory takes two |
---|
159 | command line arguments: the full pathname of the database to be |
---|
160 | created and the name of a configuration file consisting of directory |
---|
161 | and file names each on a line by itself - see `/etc/ld.so.conf' for |
---|
162 | an example. |
---|
163 | |
---|
164 | Putting a directory name in this file means all regular files found |
---|
165 | in this directory are included in the database, but it will not |
---|
166 | recursively descend into subdirectories (for instance, we want |
---|
167 | everything in `/usr/lib' but not every single file in `/usr/lib/sgml'). |
---|
168 | You can also use filenames to include a single file. |
---|
169 | |
---|
170 | Have fun, |
---|
171 | |
---|
172 | Martin <martin@home-of-linux.org> |
---|