User Tools

Site Tools


tutorials:troubleshooting:memory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorials:troubleshooting:memory [2015/11/06 12:48]
smititelu
tutorials:troubleshooting:memory [2017/09/23 11:56]
mslehto [Monitoring Memory] mem_join is disabled by default
Line 58: Line 58:
 Notice that for SHM only one group of statistics is printed, being one zone of memory, while for PKG you get a list with many groups of statistics, each specific for a Kamailio process (child). Notice that for SHM only one group of statistics is printed, being one zone of memory, while for PKG you get a list with many groups of statistics, each specific for a Kamailio process (child).
  
-In order to merge the free memory fragments one should enable memory join. This is enable by default in latest kamailio:+In order to merge the free memory fragments one should enable memory join. Default is disabled (mem_join=0).
 <code> <code>
 mem_join=1 mem_join=1
Line 167: Line 167:
 20(4082) NOTICE: fm_status:  count=     1 size=       704 bytes from <core>: cfg/cfg_struct.c: cfg_shmize(217) 20(4082) NOTICE: fm_status:  count=     1 size=       704 bytes from <core>: cfg/cfg_struct.c: cfg_shmize(217)
 20(4082) NOTICE: fm_status:  count=     3 size=        64 bytes from usrloc: udomain.c: build_stat_name(51) 20(4082) NOTICE: fm_status:  count=     3 size=        64 bytes from usrloc: udomain.c: build_stat_name(51)
 +</code>
 +
 +If you dumped the status with qm_malloc, you can extract the logs from syslog and count the unique allocations with next commands:
 +
 +<code>
 +grep qm_status /var/log/syslog >qm_status.txt
 +
 +# or:
 +# grep qm_status /var/log/messages >qm_status.txt
  
 +grep alloc qm_status.txt | awk '{ print substr( $0, 16, length($0) ) }' | sort | uniq -c | sort -k1n
 </code> </code>
 ===== Using GDB ===== ===== Using GDB =====
tutorials/troubleshooting/memory.txt ยท Last modified: 2021/06/01 20:44 by giavac