RELEASE NOTES FOR LIBGTOP 1.0 STABLE ==================================== OVERVIEW -------- LibGTop is a library that read information about processes and the running systems. This information include: General System Information: cpu - CPU Usage mem - Memory Usage swap - Swap Usage (including paging activity) loadavg - Load average (including nr_running, nr_tasks, last_pid) uptime - Uptime and Idle time, can be calculated from CPU usage SYS V IPC Limits: shm_limits - Shared Memory Limits msg_limits - Message Queue Limits sem_limits - Semaphore Set Limits Network: netload - Network load ppp - PPP statistics Process List: proclist - List of processes Process information: proc_state - cmd, state, uid, gid proc_uid - uid,euid,gid,egid,pid,ppid,pgrp session,tty,tpgid,priority,nice proc_mem - size,vsize,resident,share,rss,rss_rlim proc_time - start_time,rtime,utime,stime,cutime,cstime timeout,it_real_value,frequency proc_signal - signal,blocked,sigignore,sigcatch proc_kernel - k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt kstk_esp,kstk_eip,nwchan,wchan proc_segment - text_rss,shlib_rss,data_rss,stack_rss,dirty_size start_code,end_code,start_stack Process maps: proc_args - Command line arguments proc_map - Process map (/proc//maps under Linux) File system usage: mountlist - List of currently mounted filesystems fsusage - File system usage PORTABILITY: ----------- LibGTop is designed to be as portable as possible. None of the functions and retrieved information should be specific to a specific operating system. So you only need to port the system dependent part of the library to a new system and all application programs can then use libgtop on this new system. CLIENT/SERVER MODEL: ------------------- Some systems like DEC OSF/1 or BSD require special privileges for the calling process to fetch the required information (SUID root/SGID kmem). To solve this problem, I designed a client/server model which makes a call to a SUID/SGID server which fetches the required information whenever it is required. This server is only called for features that really require privileges, otherwise the sysdeps code is called directory (every user can get the CPU usage on DEC OSF/1, but only root can get information about processes other than the current one). There is also some kind of daemon which can be used to fetch information from remote systems (still experimental). This daemon normally runs as nobody and calls the SUID/SGID itself when needed. LIBGTOP AND GNOME: ----------------- LibGTop is currently used in various places in the GNOME Project, for instance in some of the applets in gnome-core and - of cause - this ultra-cool application called GTop ... Although LibGTop is not specific to GNOME and under GPL license, I spent most my time during the last months to work in the GNOME project so this is the primary use for LibGTop (and currently the only one). However, you can also give its configure.in script the `--without-gnome' parameter and then use it fully without GNOME in your own applications. LIBGTOP AND GNOME - PART II: --------------------------- LibGTop was tested with FreeBSD 3.0 but it should also work with FreeBSD 2.2.7, NetBSD and OpenBSD. Currently my primary aim is to help the GNOME people with our 1.0 release so I won't have much time to test it with any other system than Linux. However, I consider FreeBSD, NetBSD and OpenBSD as supported systems for LibGTop and whenever I get bug reports I will do my best to fix them as quickly as possible. PLATFORM SPECIFIC NOTES FOR LINUX: ================================== Under Linux, LibGTop should work without problems and read everything from /proc. LibGTop 0.25 also had an experimental kernel interface to read this information directly from the kernel with a system call - but I have currently dropped support for this as I am too busy with GNOME development to keep current with kernel hacking. PLATFORM SPECIFIC NOTES FOR SOLARIS: ==================================== Since so many people were asking me about this: LibGTop currently does not have any support for Solaris, and it will never have until some volunteer writes the code for it. I can't do this myself since I do not have any machine to test it on. PLATFORM SPECIFIC NOTES FOR BSD: ================================= There are a few caveats: * You need to manually make the `$(prefix)/bin/libgtop_server' SGID to kmem after installation and mount the /proc file system of FreeBSD (/proc//mem is used within kvm_uread ()). * To get the filenames of the process maps displayed in GTop, you need to configure with the `--with-libgtop-inodedb' option (you need GDBM for this to work). You have then to create an inode database which is used to look up filenames. This is done using the `mkinodedb' program which comes along with libgtop. See the file src/inodedb/README for details: The `mkinodedb' program which is build in this directory takes two command line arguments: the full pathname of the database to be created and the name of a configuration file consisting of directory and file names each on a line by itself - see `/etc/ld.so.conf' for an example. Putting a directory name in this file means all regular files found in this directory are included in the database, but it will not recursively descend into subdirectories (for instance, we want everything in `/usr/lib' but not every single file in `/usr/lib/sgml'). You can also use filenames to include a single file. Have fun, Martin