Note: This feature does not detect problems in application code; it onl watches kernel and kernel extension code.
bosdebug command
The bosdebug command turns the MODS facility on and off. Only
the root user can run the bosdebug command.
To turn on the base MODS support, type:
bosdebug -MFor a description of all the available options, type:
bosdebug -?Once you have run bosdebug with the options you want, run the bosboot -a command, then shutdown and reboot your system (using the shutdown -r command). If you need to make any changes to your bosdebug settings, you must run bosboot -a and shutdown -r again.
When to use the MODS feature
This feature is useful in the following circumstances:
MODS works by turning on additional checking to help detect the conditions listed above. When any of these conditions is detected, your system crashes immediately and produces a dump file that points directly at the offending code. (Previously, a system dump might point to unrelated code that happened to be running later when the invalid situation was finally detected.)
If your system crashes while the MODS is turned on, then MODS has most likely done its job.
To make it easier to detect that this situation has occurred, the crash command has been extensively modified. The stat subcommand of crash now displays both:
Similarly, the netm command displays allocation and free records for memory allocated using the net_malloc kernel service (for example, mbufs, mclusters, etc.).
You can use these commands, as well as standard crash techniques, to determine exactly what went wrong.
MODS limitations
There are limitations to the Memory Overlay Detection System.
Although it significantly improves your chances, MODS cannot detect all
memory overlays. Also, turning MODS on has a small negative impact on overall
system performance and causes somewhat more memory to be used in the kernel
and the network memory heaps. If your system is running at full CPU
utilization, or if you are already near the maximums for kernel memory usage,
turning on the MODS may cause performance degradation and/or system hangs.
Our practical experience with the MODS, however, is that the great majority of customers will be able to use it with minimal impact to their systems.
MODS benefits
You'll see these benefits from using the MODS: