
mmon
mmon is a big bloated Motif program that helps debug MCP programs and Myrinet problems. mmon shows a real-time picture of a Myrinet. mmon shows MCP counters, registers, ISR bits, variables, arrays, the network map and routes. mmon lets you make dump files of MCP memory.
Mmon reads in 3 kinds of files. To examine a running MCP, you must read in an "mcp.dat" file: select "Open mcp.dat". To dump the contents of an MCP's memory, first open the "mcp.dat" file for the MCP, and then select "Save As Dump." You can open this dump file as if it were an MCP file--with "Open Dump"; it will act just like a frozen MCP. When dumping an MCP, you can make sure that the MCP's map doesn't change during the dump, by using the "Handshake with Mapper" toggle button on the "Save As Dump" File Selection Box. Finally, you can save a file representing the topology of a Myrinet with the "Save As Map" menu item. You can open these map files, into windows of their own, with "Open Map." These map files can be used with the "compare" feature, which is explained below.
Mmon's dump feature replaces the old "ldump" program. Files created with "ldump" are not compatible with Mmon.
To use Mmon, first open an "mcp.dat" file, or a "dump" file.
Next, select the "Counters" from the "Special" Menu. The Counters dialog box shows you various MCP counters. Verify that the MCP is working properly:
Now that you have verified that the MCP is working, you can show the network map. In the main mmon window, select the "Mapping" toggle Button. If nothing happens, try again. Once you have a map, you can pretty it up my moving nodes with the mouse. You can change the labels of the nodes by double clicking on them. Sometimes this seems to require a brisk triple or even quadruple click. You can save the map to a file by selecting the "Save As" item from the "File" menu. You can watch the Map change in real-time by clicking the "Continuous" Toggle button on the mmon main window. You can compare the current network map to a network map store in a file by first opening the file, with the "Open Map File" item from the "File Menu" and then by pushing the "Compare" toggle button on mmons main window. You can see (sometimes) routes from your host (the largest computer icon) to any other host by selecting the "Routes" toggle button and then by selecting the desired destination node on the main map.
You should never need to do this, but you can, if you want, reload the MCP by pushing the "Reset" button. Normally the "i" (interrupt) toggle button should be selected too.
To see the bandwidths and bytecounts across various MCP interfaces, use the Dials dialog box, by selecting "Dials" from the "Special" menu.
If you are writing your own MCP you can use the Debug dialog box to see the values of MCP variables, or of LANai memory locations. Select "Debug" from the "Special" Menu. In the lefthand column you can type variable names; their values will be shown in the righthand column. If the variable cannot be found a question mark will appear in the righthand column.
This debug window syntax is for versions of mmon 3.7 or greater. If you have an older version of mmon the words "short" and "char" are not defined, and, by default, all variables and addressing is half-words.
| Variable | Value |
|---|---|
| name | a 32 bit number called name |
| (char)name | an 8-bit number. |
| (short)name | a 16 bit number. |
| (long)name | a 32 bit number. |
| &name | the address of name. (half-word addressed on the L2) |
| name[i] | the i-th 32 bit number in an array of 32 bit numbers. |
| (char)name[i] | the i-th 8-bit number in an array of 8-bit numbers. |
| (short)name[i] | the i-th 16-bit number in an array of 16-bit numbers. |
| (long)name[i] | the i-th 32-bit number in an array of 32-bit numbers. |
| 0xhex number | the 32-bit contents of memory location hex number. |
| (char)0xhex number | the 8-bit contents of memory location hex number. |
| (short)0xhex number | the 16-bit contents of memory location hex number. |
| (long)0xhex number | the 32-bit contents of memory location hex number. |
Whitespace probably counts. You can load a list of variables saved in a file with the "load" button on the Debug window. To use half-word addressing (for the L2) push the button called "L2" in.
The mmon Dump feature is also useful for debugging your own MCP.
Finally, you can change the rate at which mmon samples the MCP (updates maps, if Continuous or Compare is selected) with the Scale control just beneath the mmon main window's menu. The number show is the sample period, in seconds.
On some ill-configured systems mmons fonts look foul. To fix foul fonts,
create an app-defaults file and define the variable
Mmon*fontList:By default most of mmon fonts are 12 point Helvetica:
Mmon*fontList: *-*-Helvetica-bold-r-*-*-*-120-*-*-p-*-*-*"On my solaris computer 12 point Helvetica looks like dry catfood. So I use the screen font, which is supposed to be readable on the screen:
Mmon*fontList:-*-screen-bold-r-*-*-*-140-*-*-*-*-*-*To make an app-defaults file active you can rely on X-Windowses complicated environment variable scheme, which somehow searches for app-defaults files in certain randomly defined directories. Or you can just tell X to take your app-default directly, with xrdb. In my .xinitrc file I have the line
xrdb -merge mmon.adThere is also a way you can set app-defaults variables through the command line. And some people claim that the .Xdefaults file in your home directory is automatically used to set up the X resource database.
Mmon*background: lightgrey Mmon*highlightThickness: 0 Mmon*fontList:-*-screen-bold-r-*-*-*-140-*-*-*-*-*-* Mmon*Net.background: white Mmon*Net.symbolFont: -*-screen-bold-r-*-*-*-140-*-*-*-*-*-* Mmon*XmScrolledWindow.scrollingPolicy: AUTOMATIC Mmon*XmScrolledWindow.visualPolicy: VARIABLE Mmon*XmScrolledWindow.height: 330 Mmon*XmScrolledWindow.width: 460 Mmon*liveLink.width:2 Mmon*liveLink.foreground:black Mmon*deadLink.width:1 Mmon*deadLink.foreground:red Mmon*routeLink.width:2 Mmon*routeLink.foreground:blue Mmon*autoUnmanage:False Mmon*applicationLabel.fontList: -*-screen-bold-r-*-*-*-140-*-*-*-*-*-* Mmon*copyrightLabel.fontList: -*-screen-bold-r-*-*-*-240-*-*-*-*-*-* Mmon*companyLabel.fontList: -*-screen-bold-r-*-*-*-140-*-*-*-*-*-* Mmon*companyLabel.foreground:blue Mmon*aboutDialog.width: 280 Mmon*aboutDialog.height: 180 Mmon*mainWindow.width:600 Mmon*mainWindow.height:500 Mmon*XmToggleButton.fillOnSelect: True Mmon*XmToggleButton.selectColor: yellow Mmon*XmTextField.background: white Mmon*dialDialog*squareForm.background: white Mmon*dialDialog*dial.background: white Mmon*dialDialog.width: 320 Mmon*dialDialog.height: 360 Mmon*debugDialog.height: 500 Mmon*debugDialog.width: 400 Mmon*debugDialog.pane.top.height: 80 Mmon*countDialog*fres.foreground:red |