.\" memdb.1 .\" $Id: //info.geodesic.com/change/50147/src/GCDocs/Lite/man/man1/memdb.1#1$ .\" Copyright 1998 Geodesic Systems. All rights reserved. .nr X .TH memdb 1 "1998-08-19" .SH NAME memdb \- Memory Debugger. Run Workshop Memory Monitor on an Executable .SH SYNOPSIS .B memdb [ .B \-d ] [ .B \-g ] [ .B \-b ] [ .B \-v ] [ .B \-w .I web-browser ] [ .B \-p .I port ] [ .B \-m .I monfilepath ] command .SH DESCRIPTION .BR 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 \f2command\f1, memdb starts the .BR 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 \f2web-browser\f1 should be in PATH. The WorkShop Memory Monitor will also run on the children processes that \f2command\f1 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 \f2command\f1 are stored in a single subdirectory. When \f2command\f1 and the \f2web-browser\f1 exit, the subdirectory and the monitor files are removed. Since the communication between the program and the gcmonitor 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 directory is not in a local disk. .SH OPTIONS .TP .B \-d Tells the Memory Debugger not to delete the monitor files after the command and the \f2web-browser\f1 exit. .TP .B \-g Tells the Memory Debugger not to automatically run the gcmonitor and the \f2web-browser\f1. .TP .B \-b Tells the Memory Debugger not to automatically run the \f2web-browser\f1. .TP .B \-v Set the Memory Debugger in verbose mode. .TP .BI \-w " web-browser" Sets the \f2web-browser\f1 to be used. The \f2web-browser\f1 should be able to handle in the first argument an initial URL. By default \f2web-browser\f1 is "netscape". .TP .B \-p " port" Sets the gcmonitor port. By default a random unused port is chosen. .TP .B \-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. .SH TROUBLESHOOTING .SS Problem My program shows an error: .TP .B !!! **** Could not reopen gcmonitor file. .SS Solution Some children processes that your program created are still running, and you may have exited the \f2web-browser\f1. Do not exit the \f2web-browser\f1 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. .SS Problem The \f2web-browser\f1 is not able to connect to the gcmonitor. .SS Solution Check .BR gcmonitor (1) for more troubleshooting. .SH SEE ALSO .BR gcmonitor (1), .LP .I WorkShop Memory Monitor User's Manual