Hi

I've checked bearerbox source code and found that If you send SIGQUIT to
the bearerbox process it should report it's memory usage, current memory
allocated, highest usage, etc.

But, it seems it's not working for me.

What I did:

I've set log-level to 0, did a kill -SIGQUIT `pidof bearerbox`, the only
thing I see in logs is:

2012-10-16 16:28:49 [21958] [0] WARNING: SIGQUIT received, reporting memory
usage.

and nothing else, any idea how to get this ?

or do I need to compile kannel with custom options?

in source code I see this in gwlib/gwmem-check.c:

void gw_check_check_leaks(void)
{
    long calculated_size;
    long index;

    gw_assert(initialized);
    lock();

    for (index = 0; index < free_ring_len; index++) {
        drop_from_free_ring(index);
    }
    free_ring_len = 0;

    calculated_size = 0;
    for (index = 0; index < num_allocations; index++) {
        calculated_size += allocated[index].area_size;
    }
    gw_assert(calculated_size == total_size);

    debug("gwlib.gwmem", 0, "----------------------------------------");
    debug("gwlib.gwmem", 0, "Current allocations: %ld areas, %ld bytes",
          num_allocations, total_size);
    debug("gwlib.gwmem", 0, "Highest number of allocations: %ld areas",
          highest_num_allocations);
    debug("gwlib.gwmem", 0, "Highest memory usage: %ld bytes",
          highest_total_size);
    for (index = 0; index < num_allocations; index++) {
        check_marks(&allocated[index], index);
        dump_area(&allocated[index]);
    }

    unlock();
}

Reply via email to