Module: kamailio
Branch: master
Commit: 02dc876cc6d8e78bfc26c4c2318814aec22c4498
URL:
https://github.com/kamailio/kamailio/commit/02dc876cc6d8e78bfc26c4c2318814a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-10-11T19:37:54+02:00
core: mem_summary taken in consideration for runtime pkg dump callback
---
Modified: pt.c
---
Diff:
https://github.com/kamailio/kamailio/commit/02dc876cc6d8e78bfc26c4c2318814a…
Patch:
https://github.com/kamailio/kamailio/commit/02dc876cc6d8e78bfc26c4c2318814a…
---
diff --git a/pt.c b/pt.c
index 2c65250..348a74d 100644
--- a/pt.c
+++ b/pt.c
@@ -528,8 +528,15 @@ void mem_dump_pkg_cb(str *gname, str *name)
possible race with a parallel cfg_set */
((struct cfg_group_core*)core_cfg)->memlog=memlog;
- LOG(memlog, "Memory status (pkg) of process %d:\n", my_pid());
- pkg_status();
+ if (cfg_get(core, core_cfg, mem_summary) & 1) {
+ LOG(memlog, "Memory status (pkg) of process %d:\n", my_pid());
+ pkg_status();
+ }
+ if (cfg_get(core, core_cfg, mem_summary) & 4) {
+ LOG(memlog, "Memory still-in-use summary (pkg) of process %d:\n",
+ my_pid());
+ pkg_sums();
+ }
((struct cfg_group_core*)core_cfg)->memlog=old_memlog;
}