[sr-dev] git:master:02dc876c: core: mem_summary taken in consideration for runtime pkg dump callback

Daniel-Constantin Mierla miconda at gmail.com
Sun Oct 11 19:38:38 CEST 2015


Module: kamailio
Branch: master
Commit: 02dc876cc6d8e78bfc26c4c2318814aec22c4498
URL: https://github.com/kamailio/kamailio/commit/02dc876cc6d8e78bfc26c4c2318814aec22c4498

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/02dc876cc6d8e78bfc26c4c2318814aec22c4498.diff
Patch: https://github.com/kamailio/kamailio/commit/02dc876cc6d8e78bfc26c4c2318814aec22c4498.patch

---

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;
 	}




More information about the sr-dev mailing list