147 lines
4.9 KiB
Plaintext
147 lines
4.9 KiB
Plaintext
RELEASE NOTES FOR LIBGTOP 0.25 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
|
|
|
|
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_map - Process map (/proc/<pid>/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 priviledges for the calling
|
|
proces 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 priviledges, 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.
|
|
|
|
GNOME APPLETS:
|
|
--------------
|
|
|
|
There are some applets and applications which already use LibGTop. They can
|
|
be found in the `libgtop-apps' module in the GNOME CVS tree:
|
|
|
|
* Applets: cpuload, cpumemusage - they need LibGTop to get their information
|
|
on all systems other than Linux.
|
|
|
|
* Applets: diskusage - just uses the mountlist/fsusage features of LibGTop,
|
|
the one in gnome-core also works on other systems.
|
|
|
|
* Applets: multiload - I enhanced the cpuload applet a little bit, it is
|
|
now a multi applet and can display CPU, Memory and
|
|
Swap usages.
|
|
|
|
GTOP:
|
|
----
|
|
|
|
This cool GNOME app has been ported to use LibGTop. It can be found in
|
|
`libgtop-apps/gtop' in the GNOME CVS tree.
|
|
|
|
You can now use nearly the full functionality of GTop on FreeBSD !
|
|
|
|
|
|
PLATTFORM SPECIFIC NOTES FOR LINUX:
|
|
==================================
|
|
|
|
Under Linux, LibGTop should work without problems and read everything
|
|
from /proc.
|
|
|
|
There is also an experimental kernel interface to read this information
|
|
directly from the kernel with a system call - but this is still experimental
|
|
and not well tested while I made this release.
|
|
|
|
PLATTFORM SPECIFIC NOTES FOR FREEBSD:
|
|
====================================
|
|
|
|
LibGTop should now work under FreeBSD and give you the full functionality
|
|
of GTop.
|
|
|
|
There are a few caveats:
|
|
|
|
* You need to manually make the `$(prefix)/bin/libgtop_server' SGID to kmem
|
|
after installation and mount the /proc filesystem of FreeBSD
|
|
(/proc/<pid>/mem is used withing 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 to
|
|
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 everythink 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 <martin@home-of-linux.org>
|