Hi,
On 2016-03-01 23:23, Nathan Scott wrote:
> ----- Original Message -----
>>
>> While reviewing the Perl PMDA pipe input code (basically it doesn't
>> work, I'm randomly getting empty lines or seeing lines missed which
>> never happens with the external command and tee(1)), I noticed the
>> following socket input related bug. This makes me wonder how well tested
>> the pipe/socket input mechanisms are, are they worth trying or is it
>> best to stick with the more widely used methods?
>
> Best would be to fix the bug(s) as you've done - also good would be to
> have some modern PMDAs using the code to exercise it, and/or some more
> regression tests in the area. :)
If still using the earlier sent pmdatest.pl but with the below script
to produce "CSV" data, I'm starting to see discrepancies in the
received data immediately - looks like the key factor is the length of
the input lines:
#!/bin/sh
echo "# Timestamp;ID;Key;Value;Type"
while true; do
ts="A very long time timestamp here for the sake of testing"
echo "# BOD"
for i in $(seq 1 99); do
echo "$ts;$i;Date;$ts$ts$ts;String"
done
echo "# EOD"
sleep 5
done
And this is what the PMDA prints (obviously works ok on cmd line):
...
Info: Incoming data:A very long time timestamp here for the sake of
testing;88;Date;A very long time timestamp here for the sake of testingA very
long time timestamp here for the sake of testingA very long time timestamp here
for the sake of testing;String:
Info: Incoming data:the sake of testingA very long time timestamp here for the
sake of testingA very long time timestamp here for the sake of testing;String:
Info: Incoming data:A very long time timestamp here for the sake of
testing;90;Date;A very long time timestamp here for the sake of testingA very
long time timestamp here for the sake of testingA very long time timestamp here
for the sake of testing;String:
...
Thanks,
--
Marko Myllynen
|