mirror of https://github.com/sipwise/kamailio.git
Change-Id: Ic56ac61a4b63e2975c99034de24c2877d702bfd1changes/58/13358/5
parent
967f2b7496
commit
baa283ce55
@ -0,0 +1,58 @@
|
||||
From: Victor Seva <linuxmaniac@torreviejawireless.org>
|
||||
Date: Tue, 23 May 2017 18:07:54 +0200
|
||||
Subject: core: fix mem_summary comparation when SIGUSR1 is received
|
||||
|
||||
>From http://www.kamailio.org/wiki/cookbooks/4.4.x/core#mem_summary
|
||||
1 - dump all the pkg used blocks (status)
|
||||
2 - dump all the shm used blocks (status)
|
||||
4 - summary of pkg used blocks
|
||||
8 - summary of shm used blocks
|
||||
---
|
||||
main.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/main.c b/main.c
|
||||
index 8b2e8e8..b6f68df 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -709,7 +709,7 @@ void handle_sigs(void)
|
||||
LOG(memlog, "Memory status (pkg):\n");
|
||||
pkg_status();
|
||||
}
|
||||
- if (cfg_get(core, core_cfg, mem_summary) & 2) {
|
||||
+ if (cfg_get(core, core_cfg, mem_summary) & 4) {
|
||||
LOG(memlog, "Memory still-in-use summary (pkg):\n");
|
||||
pkg_sums();
|
||||
}
|
||||
@@ -717,11 +717,11 @@ void handle_sigs(void)
|
||||
#endif
|
||||
#ifdef SHM_MEM
|
||||
if (memlog <= cfg_get(core, core_cfg, debug)){
|
||||
- if (cfg_get(core, core_cfg, mem_summary) & 1) {
|
||||
+ if (cfg_get(core, core_cfg, mem_summary) & 2) {
|
||||
LOG(memlog, "Memory status (shm):\n");
|
||||
shm_status();
|
||||
}
|
||||
- if (cfg_get(core, core_cfg, mem_summary) & 2) {
|
||||
+ if (cfg_get(core, core_cfg, mem_summary) & 8) {
|
||||
LOG(memlog, "Memory still-in-use summary (shm):\n");
|
||||
shm_sums();
|
||||
}
|
||||
@@ -821,7 +821,7 @@ void sig_usr(int signo)
|
||||
LOG(memlog, "Memory status (pkg):\n");
|
||||
pkg_status();
|
||||
}
|
||||
- if (cfg_get(core, core_cfg, mem_summary) & 2) {
|
||||
+ if (cfg_get(core, core_cfg, mem_summary) & 4) {
|
||||
LOG(memlog, "Memory still-in-use summary (pkg):"
|
||||
"\n");
|
||||
pkg_sums();
|
||||
@@ -840,7 +840,7 @@ void sig_usr(int signo)
|
||||
LOG(memlog, "Memory status (pkg):\n");
|
||||
pkg_status();
|
||||
}
|
||||
- if (cfg_get(core, core_cfg, mem_summary) & 2) {
|
||||
+ if (cfg_get(core, core_cfg, mem_summary) & 4) {
|
||||
LOG(memlog, "Memory still-in-use summary (pkg):\n");
|
||||
pkg_sums();
|
||||
}
|
||||
Loading…
Reference in new issue