This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorials:troubleshooting:memory [2015/05/14 13:46] miconda [OS Memory Reports] |
tutorials:troubleshooting:memory [2015/09/04 00:47] miconda [Memory Manager Debugging] |
||
---|---|---|---|
Line 113: | Line 113: | ||
* for SHM memory: | * for SHM memory: | ||
< | < | ||
- | kamcmd cfg.set_now_int core mem_dump_shm | + | kamcmd cfg.set_now_int core mem_dump_shm |
</ | </ | ||
Line 135: | Line 135: | ||
For PKG is similar format, just SHM replaced with PKG in messages. | For PKG is similar format, just SHM replaced with PKG in messages. | ||
+ | To generate summary report, do: | ||
+ | |||
+ | < | ||
+ | # first set memlog lower than debug | ||
+ | kamcmd cfg.set_now_int core memlog 1 | ||
+ | |||
+ | kamcmd corex.shm_summary | ||
+ | </ | ||
+ | |||
+ | The log for f_malloc with debug enabled should look like: | ||
+ | |||
+ | < | ||
+ | 20(4082) NOTICE: fm_status: summarizing all alloc' | ||
+ | 20(4082) NOTICE: fm_status: | ||
+ | 20(4082) NOTICE: fm_status: | ||
+ | 20(4082) NOTICE: fm_status: | ||
+ | 20(4082) NOTICE: fm_status: | ||
+ | 20(4082) NOTICE: fm_status: | ||
+ | 20(4082) NOTICE: fm_status: | ||
+ | 20(4082) NOTICE: fm_status: | ||
+ | 20(4082) NOTICE: fm_status: | ||
+ | 20(4082) NOTICE: fm_status: | ||
+ | |||
+ | </ | ||
===== Using GDB ===== | ===== Using GDB ===== | ||
Line 213: | Line 237: | ||
After updating Makefile.defs recompile and reinstall. | After updating Makefile.defs recompile and reinstall. | ||
+ | |||
+ | Other tools available out there (e.g., valgrind) can be then used to track the PKG memory operations done by Kamailio. | ||
===== OS Memory Reports ===== | ===== OS Memory Reports ===== |