<div dir="ltr">Hi Patrick,<div><br></div><div>RHEL/CentOS 7 did an /dev/log to journald to rsyslog chaining. 1)</div><div>So you need to adjust *journald* plus *rsyslog* to fit your needs. </div><div>Background IMHO is to protect your System due massiv logging.</div><div><br></div><div>And of course - maybe you log *to many* in kamailio.</div><div><br></div><div>1)<br><a href="https://www.thegeekdiary.com/how-to-disable-or-extend-system-logging-rate-limit-on-centos-rhel-7/">https://www.thegeekdiary.com/how-to-disable-or-extend-system-logging-rate-limit-on-centos-rhel-7/</a><br></div><div><br></div><div>Best</div><div>Karsten</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Do., 25. Nov. 2021 um 10:29 Uhr schrieb Ginhoux, Patrick <<a href="mailto:patrick.ginhoux@fr.unisys.com">patrick.ginhoux@fr.unisys.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_6887401309379790421WordSection1"><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks  all for your information.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Now this morning on live SIP Proxies, I have configured the /etc/systemd/journald.conf with :<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">RateLimitIntervalSec=0<br>RateLimitBurst=0<u></u><u></u></p><p class="MsoNormal">I have restarted the journald/rsyslog services. But few seconds later, the logging still stop again.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I have applied the other values suggested in the old article:<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">RateLimitBurst=1000000 in /etc/systemd/journald.conf <u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">$imjournalRatelimitInterval 1 and $imjournalRatelimitBurst 500000 in /etc/rsyslog.conf<u></u><u></u></p><p class="MsoNormal">With the above values, I have new no more logs issues like reported in the article.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The above issue is a pure OS problem and I will probably open a ticket to RedHat.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Now back on my initial question related to journald. <u></u><u></u></p><p class="MsoNormal">On my SIP Proxies, journald is using about 10% of the CPU configured, which is very high when Kamailio used about 1%.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">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.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Do you think possible to change this by a mechanism to send log messages thru UDP to write the logs directly to rsyslog, <u></u><u></u></p><p class="MsoNormal">meaning to replace all the xlog calls in the kamailio.cfg script ?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(204,204,204);padding:4pt 0cm 0cm"><p class="MsoNormal" style="margin-bottom:3pt;border:none;padding:0cm"><b><span lang="FR-BE" style="color:rgb(68,68,68)">Cordialement.<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-bottom:3pt;border:none;padding:0cm"><b><span lang="FR-BE" style="color:rgb(68,68,68)">Patrick GINHOUX</span></b><span lang="FR-BE" style="color:rgb(68,68,68)"> <b><u></u><u></u></b></span></p></div><p class="MsoNormal" style="margin-bottom:3pt"><span lang="FR-BE" style="font-size:9pt;color:rgb(68,68,68)">Unisys | +33 1 46 69 52 12 </span><span lang="FR" style="font-size:9pt;color:rgb(68,68,68)">| +33 6 60 32 24 74</span><span lang="FR" style="font-size:9pt;color:rgb(68,68,68)"> </span><span lang="FR" style="font-size:9pt;color:rgb(68,68,68)">| <a href="mailto:patrick.ginhoux@unisys.com" target="_blank">patrick.ginhoux@unisys.com</a></span><span lang="FR"><u></u><u></u></span></p></div><p class="MsoNormal"><span lang="FR"><u></u> <u></u></span></p><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm"><p class="MsoNormal"><b><span lang="FR">De :</span></b><span lang="FR"> Sergey Safarov <<a href="mailto:s.safarov@gmail.com" target="_blank">s.safarov@gmail.com</a>> <br><b>Envoyé :</b> mercredi 24 novembre 2021 21:49<br><b>À :</b> Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>>; Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br><b>Cc :</b> Ginhoux, Patrick <<a href="mailto:patrick.ginhoux@fr.unisys.com" target="_blank">patrick.ginhoux@fr.unisys.com</a>><br><b>Objet :</b> Re: [SR-Users] How to not write logs to journald with kamailio<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div style="border:1pt solid rgb(6,6,6);padding:2pt"><p class="MsoNormal" style="line-height:12pt"><b><span style="font-size:10pt;color:black">EXTERNAL EMAIL - Be cautious of all links and attachments.<u></u><u></u></span></b></p></div><div><div><p class="MsoNormal">you need configure journald config file <u></u><u></u></p><div><p class="MsoNormal">/etc/systemd/journald.conf<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">[root@bcf-b ~]# grep RateLimit /etc/systemd/journald.conf<br>RateLimitIntervalSec=0<br>RateLimitBurst=0<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Wed, Nov 24, 2021 at 7:50 PM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm"><div><p>Hello,<u></u><u></u></p><p>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.<u></u><u></u></p><p>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.<u></u><u></u></p><p>Cheers,<br>Daniel<u></u><u></u></p><div><p class="MsoNormal">On 23.11.21 12:16, Ginhoux, Patrick wrote:<u></u><u></u></p></div><blockquote style="margin-top:5pt;margin-bottom:5pt"><div><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I resend this mail because of the initial destination address was not correct.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">The topic was a logging problem :<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><pre style="margin-left:36pt"><span style="font-size:11pt;font-family:Calibri,sans-serif">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.</span><u></u><u></u></pre><p class="MsoNormal" style="margin-left:36pt"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">This problem is similar as the one reported in this article : <a href="https://lists.kamailio.org/pipermail/sr-users/2018-April/101065.html" target="_blank">[SR-Users] Kamailio logs in RHEL 7 environment</a>.<u></u><u></u></p><pre style="margin-left:36pt"><span style="font-size:11pt;font-family:Calibri,sans-serif">The resolution was to increase some journald/rsyslog settings (RateLimitBurst=1000000 / $imjournalRatelimitInterval 1 $imjournalRatelimitBurst 500000).</span><u></u><u></u></pre><pre style="margin-left:36pt"><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><u></u><u></u></pre><pre style="margin-left:36pt"><span style="font-size:11pt;font-family:Calibri,sans-serif">But it is somehow a workaround. </span><u></u><u></u></pre><pre style="margin-left:36pt"><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><u></u><u></u></pre><pre style="margin-left:36pt"><span style="font-size:11pt;font-family:Calibri,sans-serif">I’m looking to know if it should be possible for kamailio to write directly the logs to the syslog only.</span><u></u><u></u></pre><pre style="margin-left:36pt"><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><u></u><u></u></pre><pre style="margin-left:36pt"><span style="font-size:11pt;font-family:Calibri,sans-serif">Thanks in advance to those can help me.</span><u></u><u></u></pre><pre><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><u></u><u></u></pre><p class="MsoNormal">Regards<u></u><u></u></p><p class="MsoNormal">Patrick Ginhoux<u></u><u></u></p><p class="MsoNormal"><span lang="FR"> </span><u></u><u></u></p><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm"><p class="MsoNormal"><b>De :</b> Ginhoux, Patrick <br><b>Envoyé :</b> lundi 22 novembre 2021 16:49<br><b>À :</b> 'sr-users' <a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank"><sr-users-bounces@lists.kamailio.org></a><br><b>Objet :</b> How to not write logs to journald with kamailio<u></u><u></u></p></div></div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><pre><span style="font-size:11pt;font-family:Calibri,sans-serif">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.</span><u></u><u></u></pre><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">This problem is similar as the one reported in this article : <a href="https://lists.kamailio.org/pipermail/sr-users/2018-April/101065.html" target="_blank">[SR-Users] Kamailio logs in RHEL 7 environment</a>.<u></u><u></u></p><pre><span style="font-size:11pt;font-family:Calibri,sans-serif">The resolution was to increase some journald/rsyslog settings (RateLimitBurst=1000000 / $imjournalRatelimitInterval 1 $imjournalRatelimitBurst 500000).</span><u></u><u></u></pre><pre><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><u></u><u></u></pre><pre><span style="font-size:11pt;font-family:Calibri,sans-serif">But it is somehow a workaround. </span><u></u><u></u></pre><pre><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><u></u><u></u></pre><pre><span style="font-size:11pt;font-family:Calibri,sans-serif">I’m looking to know if it should be possible for kamailio to write directly the logs to the syslog only.</span><u></u><u></u></pre><pre><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><u></u><u></u></pre><pre><span style="font-size:11pt;font-family:Calibri,sans-serif">Thanks in advance to those can help me.</span><u></u><u></u></pre><pre><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><u></u><u></u></pre><p class="MsoNormal">Regards<u></u><u></u></p><p class="MsoNormal">Patrick Ginhoux<u></u><u></u></p></div><p class="MsoNormal"><br><br><u></u><u></u></p><pre>__________________________________________________________<u></u><u></u></pre><pre>Kamailio - Users Mailing List - Non Commercial Discussions<u></u><u></u></pre><pre>  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><u></u><u></u></pre><pre>Important: keep the mailing list in the recipients, do not reply only to the sender!<u></u><u></u></pre><pre>Edit mailing list options or unsubscribe:<u></u><u></u></pre><pre>  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><u></u><u></u></pre></blockquote><pre>-- <u></u><u></u></pre><pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a><u></u><u></u></pre><pre><a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a><u></u><u></u></pre><pre>Kamailio Advanced Training - Online<u></u><u></u></pre><pre>  Feb 21-24, 2022 (America Timezone)<u></u><u></u></pre><pre>  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a><u></u><u></u></pre></div><p class="MsoNormal">__________________________________________________________<br>Kamailio - Users Mailing List - Non Commercial Discussions<br>  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>Important: keep the mailing list in the recipients, do not reply only to the sender!<br>Edit mailing list options or unsubscribe:<br>  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><u></u><u></u></p></blockquote></div></div></div></div>__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Mit freundlichen Grüßen<br>*Karsten Horsmann*<br></div>