[SR-Users] How to not write logs to journald with kamailio

Henning Westerholt hw at gilawa.com
Thu Nov 25 21:30:48 CET 2021


Hello,

as already mentioned, Kamailio just uses the standard functions for logging, it has no control about the behaviour of the syslog daemon(s). So, there should be no need to replace anything.
Maybe you can try to just replace system journal on the machine.

Your issues regarding the system journal performance can be probably better addressed at their mailing list or similar channels.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Ginhoux, Patrick
Sent: Thursday, November 25, 2021 10:26 AM
To: Sergey Safarov <s.safarov at gmail.com>; Daniel-Constantin Mierla <miconda at gmail.com>
Cc: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] How to not write logs to journald with kamailio

Hi,

Thanks  all for your information.

Now this morning on live SIP Proxies, I have configured the /etc/systemd/journald.conf with :
RateLimitIntervalSec=0
RateLimitBurst=0
I have restarted the journald/rsyslog services. But few seconds later, the logging still stop again.

I have applied the other values suggested in the old article:
RateLimitBurst=1000000 in /etc/systemd/journald.conf
$imjournalRatelimitInterval 1 and $imjournalRatelimitBurst 500000 in /etc/rsyslog.conf
With the above values, I have new no more logs issues like reported in the article.

The above issue is a pure OS problem and I will probably open a ticket to RedHat.

Now back on my initial question related to journald.
On my SIP Proxies, journald is using about 10% of the CPU configured, which is very high when Kamailio used about 1%.

So I’m looking to replace the current mechanism to write log thru the standard openlog() and syslog() functions. I assume this is done using the ‘xlog’ module.

Do you think possible to change this by a mechanism to send log messages thru UDP to write the logs directly to rsyslog,
meaning to replace all the xlog calls in the kamailio.cfg script ?


Cordialement.
Patrick GINHOUX
Unisys | +33 1 46 69 52 12 | +33 6 60 32 24 74 | patrick.ginhoux at unisys.com<mailto:patrick.ginhoux at unisys.com>

De : Sergey Safarov <s.safarov at gmail.com<mailto:s.safarov at gmail.com>>
Envoyé : mercredi 24 novembre 2021 21:49
À : Daniel-Constantin Mierla <miconda at gmail.com<mailto:miconda at gmail.com>>; Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>>
Cc : Ginhoux, Patrick <patrick.ginhoux at fr.unisys.com<mailto:patrick.ginhoux at fr.unisys.com>>
Objet : Re: [SR-Users] How to not write logs to journald with kamailio

EXTERNAL EMAIL - Be cautious of all links and attachments.
you need configure journald config file
/etc/systemd/journald.conf

[root at bcf-b ~]# grep RateLimit /etc/systemd/journald.conf
RateLimitIntervalSec=0
RateLimitBurst=0

On Wed, Nov 24, 2021 at 7:50 PM Daniel-Constantin Mierla <miconda at gmail.com<mailto:miconda at gmail.com>> wrote:

Hello,

kamailio uses internally openlog() and syslog() functions from standard libc. It has not control of what the syslog daemon does, it is a matter of OS configuration, so what you mention might be the required configuration, not a workaround. Anyhow, maybe others can comment more.

There are many other cases when the OS has to be tuned to get desired behaviour, eg., increase file descriptor limits to handle lots of connections.

Cheers,
Daniel
On 23.11.21 12:16, Ginhoux, Patrick wrote:
Hi,

I resend this mail because of the initial destination address was not correct.

The topic was a logging problem :


With the upgrade of my SIP Router proxies to RHEL 7  (and Kamailio 5.0.7) , we encounter problems where the logs are blocked to be written in the syslog.

This problem is similar as the one reported in this article : [SR-Users] Kamailio logs in RHEL 7 environment<https://lists.kamailio.org/pipermail/sr-users/2018-April/101065.html>.

The resolution was to increase some journald/rsyslog settings (RateLimitBurst=1000000 / $imjournalRatelimitInterval 1 $imjournalRatelimitBurst 500000).



But it is somehow a workaround.



I’m looking to know if it should be possible for kamailio to write directly the logs to the syslog only.



Thanks in advance to those can help me.


Regards
Patrick Ginhoux

De : Ginhoux, Patrick
Envoyé : lundi 22 novembre 2021 16:49
À : 'sr-users' <sr-users-bounces at lists.kamailio.org><mailto:sr-users-bounces at lists.kamailio.org>
Objet : How to not write logs to journald with kamailio

Hi,


With the upgrade of my SIP Router proxies to RHEL 7  (and Kamailio 5.0.7) , we encounter problems where the logs are blocked to be written in the syslog.

This problem is similar as the one reported in this article : [SR-Users] Kamailio logs in RHEL 7 environment<https://lists.kamailio.org/pipermail/sr-users/2018-April/101065.html>.

The resolution was to increase some journald/rsyslog settings (RateLimitBurst=1000000 / $imjournalRatelimitInterval 1 $imjournalRatelimitBurst 500000).



But it is somehow a workaround.



I’m looking to know if it should be possible for kamailio to write directly the logs to the syslog only.



Thanks in advance to those can help me.


Regards
Patrick Ginhoux


__________________________________________________________

Kamailio - Users Mailing List - Non Commercial Discussions

  * sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>

Important: keep the mailing list in the recipients, do not reply only to the sender!

Edit mailing list options or unsubscribe:

  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

Kamailio Advanced Training - Online

  Feb 21-24, 2022 (America Timezone)

  * https://www.asipto.com/sw/kamailio-advanced-training-online/
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211125/69d26124/attachment.htm>


More information about the sr-users mailing list