Hello everyone!
I was wondering if it is possible to get information about a packet that is being possessed by the worker without increasing log level?
I have an installation with Kamailio that is configured with two interfaces. Once in a while Kamailio stops accepting requests on one of the interfaces. It works fine for requests from other one. I think that worker processes might be locked while processing some requests. Enabling debug log is not an option because the traffic is quite high and the log file will not just be enormous, some lines will be missing. It looks like syslog will skip some of the log entries.
So is it possible to check what packet worker process is currently processing? Or do I need to add some log entries with lower log level to trace requests manually?
Thank you!
Hi,
check this.
https://opensource.com/article/18/8/introduction-pipes-linux
You can write $mb and worker id to this file without actually saving it and use another process to read it.
Michal
Hi Володимир,
The easiest way to check what a worker process is doing from the outside is to attach GDB or `strace` to its PID. You can get a list of worker processes and their PIDs with `kamcmd ps`.
From the inside, you can add some log entries, including those containing the PID ($pp) of the worker.
As far as syslog dropping log entries, this default rate-limiting can be turned off, depending on which syslog daemon you're using. If it's rsyslogd, then change these globals in the configuration (/etc/rsyslog.conf) and restart:
$SystemLogRateLimitInterval 0 $SystemLogRateLimitBurst 0 $imjournalRatelimitInterval 0 $imjournalRatelimitBurst 0
You will also want to disable rate-limiting in the `systemd-journald` config:
RateLimitIntervalSec=0 RateLimitBurst=0
-- Alex