Man Page memdb.1
NAME
memdb - Memory Debugger. Run Workshop Memory Monitor on an
Executable
SYNOPSIS
memdb [ -d ] [ -g ] [ -b ] [ -v ] [ -w web-browser ] [ -p
port ] [ -m monfilepath ] command
DESCRIPTION
memdb, the Memory Debugger, runs the WorkShop Memory Monitor
on an executable program without the need of explicitly
linking with the gc debugging library (libgc_dbg.so).
Besides executing command, memdb starts the gcmonitor(1) and
a web-browser that automatically connects to the running
gcmonitor (by default, the web-browser is set to netscape).
The paths of gcmonitor and web-browser should be in PATH.
The WorkShop Memory Monitor will also run on the children
processes that command forks.
After the browser appears on the screen, click on the
"Select Program" tab to select the process that you want to
analyze. Once you select the process, you can click on any
of the other tabs. The "Help" tab gives more information
about the functionality of the WorkShop Memory Monitor.
To communicate between the programs an the gcmonitor, the
Memory Debugger creates a monitor file (gcXXXX.mon) for
every process. These files are by default created in the
directory ~/.gcmonfiles. All the monitor files that
correspond to the processes created by command are stored in
a single subdirectory. When command and the web-browser
exit, the subdirectory and the monitor files are removed.
Since the communication between the program and the gcmoni-
tor takes place using shared memory, it is recommended to
put the monitor files in a local disk. Using a networked
file system may slow down the program starting time by a
factor of 10. Use the -m option if the ~/.gcmonfiles direc-
tory is not in a local disk.
OPTIONS
-d Tells the Memory Debugger not to delete the monitor
files after the command and the web-browser exit.
-g Tells the Memory Debugger not to automatically run the
gcmonitor and the web-browser.
-b Tells the Memory Debugger not to automatically run the
web-browser.
-v Set the Memory Debugger in verbose mode.
-w web-browser
Sets the web-browser to be used. The web-browser should
be able to handle in the first argument an initial URL.
By default web-browser is "netscape".
-p port
Sets the gcmonitor port. By default a random unused
port is chosen.
-m monfilepath
Sets the directory where the gc monitor files are
stored. It is recommended to create this directory in a
local disc to decrease the communication overhead
between the program and the gcmonitor.
TROUBLESHOOTING
Problem
My program shows an error:
!!! **** Could not reopen gcmonitor
Solution
Some children processes that your program created are still
running, and you may have exited the web-browser. Do not
exit the web-browser until your are sure the children have
finished executing. Alternatively, use the "-d" flag to
preserve the gcmonfiles, and manually delete the gcmonfiles
when you are done.
Problem
The web-browser is not able to connect to the gcmonitor.
Solution
Check gcmonitor(1) for more troubleshooting.
SEE ALSO
gcmonitor(1),
WorkShop Memory Monitor User's Manual