Module: kamailio
Branch: 5.0
Commit: fef4f2c943ffe75f94f0985499fb9e46de409a50
URL:
https://github.com/kamailio/kamailio/commit/fef4f2c943ffe75f94f0985499fb9e4…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-05-24T11:49:50+02:00
core: fix mem_summary comparation when SIGUSR1 is received
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
(cherry picked from commit b8750364571beeca6612b31a2948d62bddedc805)
---
Modified: src/main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fef4f2c943ffe75f94f0985499fb9e4…
Patch:
https://github.com/kamailio/kamailio/commit/fef4f2c943ffe75f94f0985499fb9e4…
---
diff --git a/src/main.c b/src/main.c
index 99feebbdf9..aecf0735a3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -713,7 +713,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();
}
@@ -721,11 +721,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();
}
@@ -825,7 +825,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();
@@ -844,7 +844,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();
}