Hi,
I've observed some scewed behaviour of zabbix_sender in versions 2.0+.
In previous version (1.8), I could normaly pipe output of zabbix_sender, but not after upgrade to 2.0.
Here are the examples:
And again:
And now piping:
OK, so what's up with this? strace shows the following:
Is this a bug, or what?!
I've observed some scewed behaviour of zabbix_sender in versions 2.0+.
In previous version (1.8), I could normaly pipe output of zabbix_sender, but not after upgrade to 2.0.
Here are the examples:
Code:
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000017" sent: 1; skipped: 0; total: 1
Code:
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 | head -1 sent: 1; skipped: 0; total: 1
Code:
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 | grep -v pero sent: 1; skipped: 0; total: 1 # zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 | sed 's/foo/bar/' sent: 1; skipped: 0; total: 1 # zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 | tee sent: 1; skipped: 0; total: 1
Code:
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 2>&1 | tee sent: 1; skipped: 0; total: 1
OK, so what's up with this? strace shows the following:
Code:
...
...
munmap(0x7f3079add000, 4096) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f3079ad49d0) = 13637
wait4(13637, info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000023"
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 13637
--- SIGCHLD (Child exited) @ 0 (0) ---
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3079add000
write(1, "sent: 1; skipped: 0; total: 1\n", 30sent: 1; skipped: 0; total: 1
) = 30
exit_group(0) = ?
Is this a bug, or what?!
Comment