Thanks a lot, David, for the quick reply! This solved the problem:
===
add-apt-repository ppa:adiscon/v8-stable
apt update
apt install rsyslog
rsyslogd -v
rsyslogd  8.2502.0 (aka 2025.02)
===

вс, 23 мар. 2025 г. в 06:38, David Lang <da...@lang.hm>:

> Alexey Rudenko-Desnyak wrote:
>
> >
> > VERSION. I have the latest version of rsyslog installed on Ubuntu:
> > ===
> > rsyslogd -v
> > rsyslogd  8.2112.0 (aka 2021.12) compiled with:
> > PLATFORM: x86_64-pc-linux-gnu
> > ===
>
> that is from the end of 2021. If you cannot upgrade to a newer community
> version, you will have to ask Ubuntu for assistance. Please upgrade to at
> least
> 8.2412 if not to a 8.25xx version
>
> I would suggest that you setup impstats so that you can see how many
> events are
> being processed vs how many are being queued.
>
> David Lang
>
> > CONFIG. Config is minimal:
> > ===
> > local5.info  action(
> > type="omprog"
> > binary="/tmp/test.php"
> > )
> > General configuration file contains only default settings.
> > Option $RepeatedMsgReduction is either commented out or "off".
> > ===
> >
> > BINARY. Binary /tmp/test.php simply adds stdin input to "out.log"  line
> by
> > line:
> > ===
> > #!/usr/bin/php
> > <?php
> > $SyslogMessage = fgets(STDIN, 0x1000);
> > file_put_contents('/tmp/out.log', $SyslogMessage, FILE_APPEND);
> > ===
> >
> > TEST1. I quickly send from keyboard 20 test messages:
> > ===
> > logger -p local5.info "Test1!"<Enter>
> > ... 20 times
> > ===
> > The problem: in the output file I see ONLY 8 messages (!).
> > ===
> > cat out.log
> > 2025-03-23T05:26:15.075321-03:00 AlexeyPC alexey: Test1!
> > 2025-03-23T05:26:16.611209-03:00 AlexeyPC alexey: Test1!
> > 2025-03-23T05:26:18.161275-03:00 AlexeyPC alexey: Test1!
> > 2025-03-23T05:26:19.325636-03:00 AlexeyPC alexey: Test1!
> > 2025-03-23T05:26:20.476942-03:00 AlexeyPC alexey: Test1!
> > 2025-03-23T05:26:22.115802-03:00 AlexeyPC alexey: Test1!
> > 2025-03-23T05:26:23.236457-03:00 AlexeyPC alexey: Test1!
> > 2025-03-23T05:26:24.804124-03:00 AlexeyPC alexey: Test1!
> > ===
> >
> > TEST2. Bash script sends 10 messages in a loop:
> > ===
> > cat send_test_msg.sh
> > #!/bin/bash
> > for i in {1..10};  do logger -p local5.info "Test $i"; done
> > ===
> > In the output file I see only the first message:
> > ===
> > cat out.log
> > 2025-03-23T05:44:40.592652-03:00 AlexeyPC root: Test 1
> > ===
> > Where is the rest and what is happening in general?
> > Thank you a lot in advance!!
> >
> > P.S. If I set in config file "old style" program launching
> > ===
> > local5.info  ^/tmp/test.php
> > ===
> > <?php
> > $SyslogMessage = $_SERVER['argv'][1];
> > file_put_contents('/tmp/out.log', $SyslogMessage, FILE_APPEND);
> > ===
> > - all functions perfectly, no message is lost.
> > _______________________________________________
> > rsyslog mailing list
> > https://lists.adiscon.net/mailman/listinfo/rsyslog
> > http://www.rsyslog.com/professional-services/
> > What's up with rsyslog? Follow https://twitter.com/rgerhards
> > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
> DON'T LIKE THAT.
> >
>
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to