5fd5619cc4
Based partially on a patch by wbk to fix Gentoo bug #410093 [1]. From the bug report: After fixing the /proc/meminfo issue, another bug will emerge on systems where total system RAM in bytes exceeds INT_MAX. The correct top three processes will be identified, but their load bars will have the wrong value. This is caused by a value overflow due to storing total system memory in an "int" type variable. We will end up thinking ((Total RAM) modulo (INT_MAX)) is our total system RAM, so our percentages will be inflated when drawing the load bar. This fix will require a bit more care to follow the flow of data and ensure this value isn't being cast to "int" along the way. Function return types will need to be changed. [1] https://bugs.gentoo.org/show_bug.cgi?id=410093 |
||
---|---|---|
.. | ||
xpm | ||
.cvsignore | ||
BUGS | ||
CHANGES | ||
COPYING | ||
Makefile | ||
README | ||
TODO | ||
wmtop.1 | ||
wmtop.c |
Introduction ------------ Wmtop maintains a view of the 3 top CPU (or memory) consuming processes displaying the amount of CPU used as a horizontal bar. Very useful for spotting those rogue Netscape processes! To compile: Type 'make linux' or 'make freebsd' depending on which operating system you are using. (Type uname if you don't know :-) To install: If you are superuser type 'make install' Instructions ------------ Invoke wmtop using the command 'wmtop' Use -display and -geometry options in the usual way. Use the command line option '-s <time in milliseconds>' to control the frequency of sampling of the processes and '-r <time in milliseconds>' to control how often the display is updated. Use -U to watch only your own processes rather than all of them. While running, a middle mouse click changes between the display of user processes and all processes. Use -x <regexp> to exclude processes whose name matches a given pattern from the list. Use -m to display physical memory usage instead of CPU, but is currently only supported under Linux. While running, a left mouse click changes between cpu and memory display. Use -c 'command' to have a command executed when you right click on wmtop. For example you could launch a window with the real 'top' command for a closer look at a rogue process. Use -a <1..X> to choose a theme for wmtop. Example ------- wmtop -U -x '^wm' -c "xterm -e top" Means list my own processes that are not dockapps. Launch top on a right click. Caveats ------- As far as I know this only works under Linux or FreeBSD with a /proc filesystem. Tested by me under Linux 2.2.5 and FreeBSD 3.2 (PAO) and FreeBSD 4.0 on a Sony Vaio 505TX. Reportedly works also on other platforms including various combnations of Linux and FreeBSD on Intel and Alpha CPU machines. See TODO file for information about porting progress. Credits ------- I have liberally borrowed code from wmsysmon by Dave Clark. Thanks! Thanks to Cyrille Mars (mailto:cmars@club-internet.fr) for some new pixmaps and beta testing. Thanks to Thomas C Sobczyns for beta testing (mailto:tcs@mit.edu). Thanks to Brian Servis (mailto:servis@purdue.edu) for improvements to the Makefile (that I have since ruined...). Thanks to Alan Swanson (mailto:swanson@uklinux.net) for some bugfixes and improvements.