The sentinel takes a bit of getting used to, but it comes in quite handy after a while. Not unlike the "Pulse" widget, it shows you a graph of how memory usage has evolved on your system over time. This graph is updated every two seconds.
However, the sentinel shows you several graphs at the same time, in
different colors, with the current measurements (in MB) painted in the
same colors on the left:
The graphs represent the following:
As you can imagine, this sum (the total virtual memory) can vary over time, as you can see in the above screenshot. On the left, you can see that for some reason the swap file grew really big, which made the virtual memory grow. OS/2 then later chose to shrink the swap file again.
win32k.sys
driver from Odin (March 2001 or
newer) installed, you will also get a fourth red graph even below the purple
graph which shows you the free space inside the swap file.
Here is another screenshot which shows you the memory consumption while &xwp;
was recompiled on my system:
Since I heavily use a RAM disk for precompiled header files, it is quite obvious that the free RAM becomes used up during the compile process.
The sentinel widget accepts colors and fonts that are dropped on it. Presently, you can only change the background color though. Besides, it is sizeable.
Implementation Details
The source of the information that is displayed by the sentinel widget
depends on whether a recent version of Odin's win32k.sys
driver is installed.
win32k.sys
was found, all memory information is retrieved
directly from that driver, which peeks into the OS/2 kernel memory management to
find out those values. This is extremely efficient and also more detailed than
the alternative method described below.
For this to work, you will need a win32k.sys
build from March 2001
or later. Knut Stange Osmundsen was kind enough to add that functionality to the
win32k.sys
driver for &xwp;.
Dos16MemAvail
(as described on the
"Memory" widget page) and the size of the swapper
file, which is determined periodically by doing a simple file-system call on the
swapper file directly. These values are directly represented by the top and bottom
graphs.
The total amount of virtual memory (all three graphs together)
is simply calculalated by adding the amount of total physical RAM (which is
returned from the DosQuerySysInfo
API and will never change)
to the size of the swapper file.
The middle graph (the physical RAM currently in use) is simply the difference between the total physical RAM and the currently free physical RAM.
Note that this implementation cannot show you free space in the swapper drive.