Module: kamailio
Branch: master
Commit: b8750364571beeca6612b31a2948d62bddedc805
URL:
https://github.com/kamailio/kamailio/commit/b8750364571beeca6612b31a2948d62…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-05-23T18:14:56+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
---
Modified: src/main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b8750364571beeca6612b31a2948d62…
Patch:
https://github.com/kamailio/kamailio/commit/b8750364571beeca6612b31a2948d62…
---
diff --git a/src/main.c b/src/main.c
index 3fdf070054..0aff706ffb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -710,7 +710,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();
}
@@ -718,11 +718,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();
}
@@ -834,7 +834,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();
@@ -853,7 +853,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();
}