gkrelltop is a monitor to see the three most cpu intensive processes. It
shows the pid of the most active one on mouse over as a tooltip. This way
if mozilla is going crazy on you, you can figure it out in a split and
kill it if necessary. Most useful for laptops which dont want the cpu to
be used at all times. But useful also to know, at times, which are the
processes that are claiming the cpu usage you see on the cpu monitor (of
gkrellm or otherwise). Definitely in initial stages, even though it does
what i want it to do, for the moment.

It works for gkrellm 1.* and 2.* by trying to autodetect if there is a 
gtk+2.0 installed. But if you have problems, please let me know.
It works for linux and freebsd. For the makefile parameters, read below.

With the release of gkrellm 2.2.0 the gkrellmd server can have plugins.
Thanks to Bill Willson, gkrelltop now has server plugin capability, which
I hope will make a more useful plugin. Note that gkrellm 2.2.0 will need 
to be installed in order to compile the gkrelltopd server plugin.
You will need the libgtk package (ex. libgtk2.0-dev in debian) to compile 
these sources.


To compile for gkrellm 1 or 2 simply do:
------------------------------------
	make 

or make all, or make gkrelltop and it will produce gkrelltop.so in the 
directory. To try it out do:

	gkrellm -p gkrelltop.so

To copy this in your plugin directory, for gkrellm do:
	make install 

To make the gkrelltopd server plugin using glib 1.2:
	make glib12=yes

To make and install the server plugin only (you may optionally do glib12=yes):
	make server
	make install-server

After the gkrelltopd server plugin is installed, it must be enabled by
adding a line to a gkrellmd.conf file:

	plugin-enable gkrelltopd

To check that it installs properly, do a test run of gkrellmd like so:

	gkrellmd -plog

To make a debian .deb package do:

	make deb


If make fails then compile the modules manually (look at the Makefile to 
find out what is needed). 

To only test the top_three.c functionality, you can do 
   make test_top 
and run 
   ./test_top 
to see a commandline dumping of the 3 most active processes


Description
-----------
Display the top three processes occupying the cpu, in some future version it
would be neat to display the process id by clicking on the panel or have a 
tooltip that will show all three processes, with their percentages). Right 
now i only show the first process as a tooltip, which disapears fast if 
the process receeded in activity.

Moving the mouse on top of the widget changes the list display and instead
of displaying the process name, it displays the PID and processor usage.

Notice to FreeBSD 5.x users: in the more recent versions of FreeBSD (ex. 5.x)
/proc is not mounted by default (at least some people have reported this), 
so in order for this plugin to work correctly, you need to make sure 
/proc is mounded. 

Notes from the Makefile:

   For linux need the -DLINUX as a CFLAGS parameter

   to compile for FREEBSD the CFLAGS parameter 
   needs to be -DFREEBSD 
 
   I have attempted to detect the os by the OSFLAG variable 
   NOTE that it will work only for LINUX or FREEBSD
 
   if you think it should work for your os than substituting
   your $(OSFLAG) will not quite do the trick because the wmtop code 
   (the three_top.c file) only recognises those two (LINUX and FREEBSD)
   parameters. Let me know if the more recent versions of wmtop 
   support more OS.

Testing gkrellm 2.2.0:
----------------------

To test for gkrellm 2.2.0 and gkrellmd 2.2.0 (which should be installed) 
follow the steps below.

Run gkrellmd with gkrelltopd.so:

    $ gkrellmd -p gkrelltopd.so -plog

Then on the same machine, run:

    $ gkrellm -s localhost -p gkrelltop.so

And it should be displaying data from the gkrellmd server.                      

To verify that gkrellmd is sending gkrelltop data, for about                
10 seconds run:

    $ gkrellm -s localhost -p gkrelltop.so -d 0x1000 > somelog

then quit gkrellm and search in the somelog file for gkrelltop lines.


Credits:
--------
- written by Adi Zaimi zaimi-at-pegasus.rutgers.edu
- based on the demos for gkrellm 1.* and 2.* from gkrell website
- based on Wmtop -- WindowMaker process view dock app
- Thanks to Bill Wilson for adding gkrellmd support
- Under the GNU GPLicense


Changelog:
----------
Version 2.2.3 20040527
  Made functional the configuration tabs: 
     Now one can show only processes above a certain threshold. 
     One can have the update frequency from once in 5 seconds 
     to the gkrell_update value.
     One can disable/enable displaying the nice processes in the list.
  Change Makefile so now *only* produces gkrelltop.so: 
     No more differentiating between gkrelltop2.so and the older gkrellm 1.*
     version. If there are people that use the 1.* version, they can still 
     use this program (i hope). 


Version 2.2.2 20040520
  Added gkrellmd support (Bill Wilson)
  Added debian support. Now running 'dpkg-buildpackage -rfakeroot -uc -us'
     or 'make deb' will create a debian package.


Versions 2.2.1 and earlier
  Ported it to gkrellm 2.0
