[prev in list] [next in list] [prev in thread] [next in thread]
List: sr-dev
Subject: [sr-dev] git:master:cf085a87: core: Enable SIGUSR1 for child processes
From: Alex Hermann <alex () speakup ! nl>
Date: 2016-08-30 11:51:39
Message-ID: E1behZr-0001GA-0k () www ! kamailio ! org
[Download RAW message or body]
Module: kamailio
Branch: master
Commit: cf085a870e33bcdef5dad91a3de92f25e159e669
URL: https://github.com/kamailio/kamailio/commit/cf085a870e33bcdef5dad91a3de92f25e159e669
Author: Alex Hermann <alex@speakup.nl>
Committer: Alex Hermann <alex@speakup.nl>
Date: 2016-08-02T12:46:37+02:00
core: Enable SIGUSR1 for child processes
Allow dumping of memory statistics during runtime
---
Modified: main.c
---
Diff: https://github.com/kamailio/kamailio/commit/cf085a870e33bcdef5dad91a3de92f25e159e669.diff
Patch: https://github.com/kamailio/kamailio/commit/cf085a870e33bcdef5dad91a3de92f25e159e669.patch
---
diff --git a/main.c b/main.c
index 7993590..887a58a 100644
--- a/main.c
+++ b/main.c
@@ -833,7 +833,20 @@ void sig_usr(int signo)
_exit(0);
break;
case SIGUSR1:
- /* statistics, do nothing, printed only from the main proc */
+#ifdef PKG_MALLOC
+ cfg_update_no_cbs();
+ memlog=cfg_get(core, core_cfg, memlog);
+ if (memlog <= cfg_get(core, core_cfg, debug)){
+ if (cfg_get(core, core_cfg, mem_summary) & 1) {
+ LOG(memlog, "Memory status (pkg):\n");
+ pkg_status();
+ }
+ if (cfg_get(core, core_cfg, mem_summary) & 2) {
+ LOG(memlog, "Memory still-in-use summary (pkg):\n");
+ pkg_sums();
+ }
+ }
+#endif
break;
/* ignored*/
case SIGUSR2:
_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic