ProcessController v3.1's Notice
©2001, Georges-Edouard Berenger
©2004, beunited.org
contact@beunited.org
Released as open source under LGPL, March 1, 2004.
What is ProcessController?
ProcessController is a deskbar-friendly replicant to screen & control the
activity and resources of your system "Live", such as CPU activity & Memory usage.
You can:
- See at any time how much processing power and how much memory
is currently used in your system,
- Quit any application that is running (both background and non background
BApplications),
- Screen the Memory usage of the different teams/applications,
- Screen the activity of each individual team & thread graphically "Live",
- Kill any team,
- Change the priority of any thread,
- Kill any thread,
- Start the debugger on a thread, with an intelligent semaphore-releasing mechanism,
- Turn on & off processors on multiprocessor systems,
- Launch a terminal,
- Re-launch the Tracker if it is not running anymore,
- Re-launch the Deskbar if it is not running anymore,
- Access those functionalities from any replicant aware application,
- Access those functionalities from the deskbar, as demonstrated here under. You can put
ProcessController in the Deskbar or on the Desktop (it is a replicant). It will wait for you to click on
it...
...which produces something like this:
Since version v3.1, ProcessController shows you how much CPU power is available. The time
spent in the idle thread(s) is shown in green:
Installation
ProcessController v3.1 requires BeOS R5. If you wish to use R4.5, please download ProcessController
v2.6.1.
ProcessController comes as a SoftwareValet package, meaning installation should be very easy.
If you have an other version of ProcessController, it is recommended that you let the installer
remove it when it suggests so. Replicants tend to behave strangely quite easily in that situation.
How to use ProcessController?
Launch the application. A window appears with some text and moving vertical bars left to it.
Those bars indicate two things:
- The left group of bars shows the activity of the processor(s). The more your system is loaded,
the higher are those bars.
- The right bar shows how much memory is currently used. The higher the bar is, the more memory
is used.
If you click on the bars, then a pop-up menu will appear offering ProcessController's functionalities:
To place ProcessController in the Deskbar, simply select the option "Live in the Deskbar"
of that menu. If the replicant is already in the Deskbar, then this item is checked, and selecting it
again will remove ProcessController from there. To have ProcessController come back in the Deskbar, you
will have to launch the application manually, and reselect this option.
As ProcessController is also designed to be used as a replicant, launching ProcessController will
automatically turn on the option "Show Replicants" so that you can directly drag the replicant
out there. When you quit ProcessController, the option is turned off, if it needed to be turned
on in the first place. To drag the replicant in a replicant-aware application (the Desktop for instance),
click on the little hand at the bottom right of the bars, and without releasing the mouse's button,
move it above a replicant-aware application's window. Then release the mouse's button.
If the operation is successful, then the "bars" will now be also hosted by that application.
The "Quit an Application" menu allows you to quit an application in a clean way, sending it
a B_QUIT_REQUESTED message. Note that not all teams are "true" application that can receive
BMessages. Therefore, some teams will not appear in this menu. The kernel and the application
server are examples of such teams.
The "Spy Memory Usage" menu allows you to screen the memory usage of the different teams
running in your system.
The "Kill or Change Priority" menu allows you several different things:
- You can screen the activity of the teams & threads running in your system.
- You can kill a team by selecting the team's name in the popup. You'll be given a chance
to confirm or cancel this operation with a modal dialog.
- By selecting the thread's name in the popup, you'll get a modal dialog that will offer
you to:
- Kill that thread,
- Debug that thread (useful for developers only. You can then start bdb by simply typing
bdb in the window that appears!)
- You can see what priority has each thread by looking at what item is selected in the menu
that appears when you select a thread.
- You can change a thread's priority by selecting the priority you wish in the priority
menu that appears when you select the thread.
If your system has more than one processor, then you will have an equal number of items labeled
"Processor" with a number afterwards, as shown in the screen shot above. You can turn on or off each
individual processor by selected the corresponding item. Active processors are identified by the check mark.
You can open a new Terminal window from the menu.
If either the Deskbar or the Tracker are not running, you'll have the possibility to relaunch
them. New menu items will appear when relevant.
The "Use Pulse's Settings for Colors" will allow you to change the colors of the replicant's bars.
The colors used are the one selected in the "Deskbar Mode" preference for the Pulse application.
Since I was asked to do "like Pulse", I figured that using Pulse settings directly would be what people
really wanted... (and no, I'm not lazy! ;-) If you don't like the default colors I've chosen, then you
can select your own using Pulse. Please, don't ask me to also allow users to select the width of the
replicant!
Selecting "Read Documentation" will open this file anytime you need it, if you haven't moved apart
ProcessController and this documentation of course!
Accuracy of the memory usage & activity screening
ProcessController v3.0 adds memory usage screening, but be aware that is information is
very inaccurate. BeOS
offers no real way to monitor memory usage precisely. Nevertheless, it is possible to give some
memory usage indications, but please, do understand that the figures given there are only
indications!
Here is an example of what ProcessController will tell you about the memory usage of the
different applications of your BeOS system:
The bars have different meanings:
-
The top "System Resources & Caches" bar will tell you how much memory is currently
"committed", that is, used in any way by the system or any of the running applications. This
is the biggest of all the measures given (the right number of the top line). This is also
the only "reliable" number given by the system. When this number equals what your computer
has of memory, BeOS will begin to "swap", that is, BeOS will use disk space to simulate
more physical memory. The global performances of your system will decrease significantly in
such situations, but you'll be able to continue working (well, unless you are trying to do
real time processing, but that's an other story!). In the given example, 94.1 MB of memory
are committed out of a total of 256 MB of memory. The committed memory is represented by the
colored part of the bar (both blue & purple parts).
The blue part of the bar represent the total memory used by the running applications for
their various data. This is the exact sum of very rough figures (describe below),
therefore, this "all applications memory usage indicator" is very inaccurate...
The purple part is therefore a very rough representation what the BeOS itself uses of
memory. This includes disk cache, cached binaries (when you launch an application, its
binary is loaded in memory and cached. Relaunching an application will be much faster than
the first start mostly because of that), and other internal BeOS structures. The more you
have memory, the more BeOS will use to cache various data.
- The next bar describe the memory usage of each application. Again, the bar has two
colors, but first, it must be pointed out that the colored parts represent the memory usage
taken out of the total committed memory, and not the total system memory. In the given
example, if an application had a completely colored bar, it would be "using" at most 94.1 MB,
not 256 MB.
The dark blue part of the bar represents the usable data of your application, that is the
quantity of memory where your application can currently write into, minus some data
structures shared with application & network servers. This figure is probably the a
fairly accurate approximation of what you application "really uses" of memory. Be aware
nevertheless that the way this figure is calculated is very subjective and that many would
argue with the way it is calculated. If an application leaks memory, this figure will grow.
For a very simple application, this figure will be "small". Of course, this figure doesn't
tell how much memory is used as a side effect in other applications, for instance in the
application server.
The second number (represented visually by blue part of the bar, both light & dark)
tells how much memory your application currently has access to. Don't be confused by this
second number: if you add this value for all the applications running in your system at the
same time, you will find a number possible much bigger than the total memory of your
computer! That's because a lot of memory is shared between applications to spare resources.
Shared libraries represent a big part of that number (those are pieces of code shared by
different applications). The light blue part of the bar represent the read-only parts of
memory your application can currently access to.
ProcessController v2.5 introduced the possibility to see graphically how much CPU each team
and each thread eats. ProcessController v2.6 allowed the information displayed to be much more
accurate than before (new system calls have been added to R4.5 that enable better
accuracy).
The bars have different meanings:
- At the thread level, you see the activity of each thread. At most, when the bar is
completely filled with green, or blue (dark or light), the thread is using the full power of one
processor. If your system has one single processor, then it means the entire power of your
system. If your system has more that one processor, then it means that the thread eats the
entire power of one of the processors. (Actually, the thread may have been running on
different processors, but in the end, it can only use the equivalent power of one of them, at
most.)
The dark-blue part is spent in kernel code, the light-blue part in user code,
the green part in the idle thread(s).
This information is fairly accurate.
- At the team level, you see the activity of the team, as a whole. At most, when the bar is
completely filled with blue (dark or light), the team is using the power of the entire
system, whether you have one or more processors.
The dark-blue part is spent in kernel code, the light-blue part in user code,
the green part in the idle thread(s).
This information is as accurate as the system call ProcessController uses allows it to be.
It should be fairly accurate.
- At the top of the team level, there is the special "Gone Teams" item.
This bar shows the activity of the just-gone teams. This is a very inaccurate information
calculated by ProcessController. It should be considered very approximate. To
calculate it, I add CPU power used by each team,
and look what CPU power is missing to get the full power of the system... Of course,
each of the measures I add are made at slightly different points in time. On a theoretical point of
view, I should be taken away my programmer's license!
It is plain incorrect, but that should be useful nevertheless!
How can I get ProcessController in my Deskbar at each
startup?
BeOS R5 introduces a nice API
that allow applications to put an icon in the Deskbar which will reappear there when the system
will next restart. It is not necessary anymore to modify your user bootscript as before, or put
a replicant on the desktop as advised with previous versions. Simply select the "Live in the
Deskbar" option.
Warning!
This software gives very very easy ways to simply kill the system dead (or part of it)!
Specifically, it allows you to kill any thread, any team, change priorities, etc.
If you are not sure you want to take chances to crash your system, then DON'T USE IT!
You can lose information by using this software: all information not yet saved on your hard
drive may be lost!
License
This software is released under LGPL..
ProcessController
© 2000, Georges-Edouard Berenger, All Rights Reserved.
Copyright (C) 2004 beunited.org
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You can email the team found at
Known bugs & problems
History
v3.1.1 (March 1, 2004)
v3.1 (June 10th, 2001)
- Idle time is now shown in green.
- Installer/Uninstaller fixes.
v3.0.1 (March 5th, 2001)
- Improved icon & name identification.
- Fixed Deskbar install from replicant mode.
- Better search for documentation in case of multiple installations.
- The "Quit an Application" menu is now updated live, that is, if an app is launched while the popup menu is shown
then you'll see a new menu item appear, and if an application quits, then its related menu item disappears.
- Priority menu is now also updated live.
- Made a few visual improvements.
v3.0 (June 1st, 2000)
- Final release with PPC build.
v3.0RC3 (April 25th, 2000)
- Allows installation anywhere in any folder, on any disk.
- Added an uninstall script which should be able to uninstall all ProcessController
versions released, along with the documentation (when the application is found).
v3.0RC2 (April 6th, 2000)
- Improved the way the size memory indicators are calculated in the memory popup.
Bitmaps are now accounted on the application side, not on the app_server side.
- Tuned the colors, so that the main memory bar is more red than the CPU bars.
When using "Pulse's settings for colors", then the memory bar is red.
- Improved the installer. Improved the documentation.
v3.0RC1 (March 28th, 2000)
- ProcessController used to be a simple icon on which you could click to access the functionalities
found in the popup menu. Now this icon is replaced by bars showing permanently the system's load.
As such, it resembles Pulse. I have done this because I received many requests from users
complaining of being forced to use both Pulse for that indication, and ProcessController for its
menus. I was belonging myself to these users having also a memory indicator...
- Again, just as Pulse, you can now activate and deactivate processors (also a popular request).
Special thanks to Rainer Riedl for asking & offering the icons!
- Of course, I was then asked the possibility to customize the bar's colors, "like Pulse", they all said!
Well, I done "like Pulse" then, and offered the "Use Pulse's settings for colors" option.
- Added the memory usage observation popup.
- Uses R5's new API to get ProcessController in your Deskbar automatically at startup. The
old work-arounds are not necessary anymore.
- Added on option to open the documentation directly.
- Improved the about window to provide direct access to support by email, and to
ProcessController's web site (if you are connected to the Internet, of course...).
- Added the possibility to debug thread by launching the integrated debugger on them.
If necessary, ProcessController will offer you to release the semaphore on which that thread is halted.
- Improved the installer. You should now be able to install ProcessController on other partitions.
The installer will also look for other copies of ProcessController and offer to remove them.
v2.6.1 (September 1st, 1999)
- When ProcessController's window is shown, now, the "Show Replicant" option is activated
automatically to help new BeOS users. It will be turned off again when quitting (if it was
turned on).
- Fixed the install script.
v2.6 (August 1st, 1999)
- Uses the newly discovered "clickToOpenRect" popup menu's functionality instead of my own
old timing code to determine whether the menu should stick or not. The resulting behavior
should be quite similar though, if Menu's "Click to open" setting is set.
- Fixed a crashing bug when quitting the application hosting the replicant.
- Fixed resizing bugs that appeared with Genki 5 (my fault anyway).
- Improved the way menu item are inserted and deleted when updating the menu live. Some
menu items may be recycled in certain conditions (i.e., reused for some other team instead of
being deleted and replaced with a new one), improving efficiency in stress conditions, such
as when observing a project being compiled with the BeIDE on x86.
- Replaced the "scheduling noise & lost threads" item with the more accurate "Gone
Teams". Gone threads are now correctly reported in their own team before dying.
- Removed a bug that would cause the "Always in the Deskbar" option to be selected the
first time you use ProcessController.
- ProcessController will now launch a new thread just to quit team sending them a
B_QUIT_REQUESTED message. Therefore, ProcessController (or the Deskbar) will no longer lock
for seconds when you try to quit a dying program...
- The Popup menu is now handled by an independent thread that will free the Deskbar's
window's thread.
v2.5.1 (December 15th, 1998)
- Merged the "Kill a Team", "Kill a Thread" & "Set a Thread Priority" into one single
menu, "Kill or Change Priority".
- Removed a (rare) deadlock case.
v2.5 (December 1st, 1998)
- Recompiled and adapted to R4 (uses some of its new functionalities).
- Added the possibility to screen the activity of threads & teams graphically.
- If the popup should appear too close from the bottom of the screen, then the menu items
of the first level-popup appear in reverse order.
v2.1.1 (July, 1998)
v2.1 (June 21st, 1998)
- Recompiled for R3.
- Added a "Place in Deskbar" & "Remove from Deskbar" option in order to place a
ProcessController icon in the Deskbar.
- Added the "Always in Deskbar" option.
- Added a "-deskbar" option when launched from a shell a ProcessController icon in the
deskbar... Made a number of minor modifications for this specific use.
v2.0.2 (March 1st, 1998)
- Changed behavior slightly: now always show all the running application (including the
background ones). Used to display non background applications only when using the "simple"
options mode.
- Replaced the about box for the Be Masters Awards.
- Put a gray background in the window.
v2.0.1 (November 15th, 1997)
- Attempt to fix the "workspace-change" bug. You need to click on the desktop and force the
update of the replicant to have the new color appear... It's still way from being fixed
though.
v2.0 (August, 1997)
- Updated ProcessController for PR. I decided to use the replicant technology instead of
the ugly window hack I was previously using. I feel that replicants are just perfect for what
I wanted to do.
- Replaced the ability to re-launch the Browser (RIP) by the ability to re-launch the
Tracker and/or the Deskbar when relevant.
v1.1 (Not released officially)
- Fixed a bug that would crash ProcessController if the team was a too long command
line.
- If a thread hasn't a priority defined in the Be Headers, then display that priority after
the thread's name in the priority pop-up. (If you don't understand this explanation, don't
worry, it's cool!)
v1.0 (December 12th, 1996)