Yes, I meant to use the pipe symbol.
-bash-4.1# echo "hi" | logger -t test -bash-4.1# tail messages Mar 4 08:28:36 localhost kernel: imklog 5.8.10, log source = /proc/kmsg started. Mar 4 08:28:36 localhost rsyslogd: [origin software="rsyslogd" swVersion="5.8.10" x-pid="14128" x-info="http://www.rsyslog.com"] start Mar 4 08:28:52 localhost test: hi Mar 4 08:28:52 localhost test: hi
As you can see all messages are duplicated. I tried this on a clean install of CentOS but was not able to reproduce this problem. Any pointers which might help me debug this issue.
On 04/03/14 13:58, David Benfell wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 03/03/2014 09:34 PM, Alexander wrote:
I am trying to pipe the output from a process into syslog using the logger command. Initially I pipe the output into a separate file, but as it happens this filled up the disk when things went wrong. So I figured I redirect the output to syslog and let logrotate deal with the roll-over and archive of the file.
However the following command :
echo "HI" > logger -t test
What are the contents of the file HI in the working directory from which you ran this command?
(I think you mean `echo "HI" | logger -t test`.)
David Benfell see https://parts-unknown.org/node/2 if you don't understand the attachment -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCgAGBQJTFWubAAoJEBV64x4SNmArD5kP/0HgMyYUkdrnntdO+zPUf9t6 QrKdGsSPhy2md/AN66B2s2BBk5wYnP3oMPJi+VGDjes8mlLK6hxdfJSVj/hAS+YY saOxTQwe8AlTP3nbbJbzmdER3qJ/wYn6SDMXedQlErgLZ1sl2ZF7dcKvxXLQqPu0 W/Cn1gCymLino6AgH8inCDaqyAeQHS0QVM0a718ajrafACvbZOutbqbqCiv/syQR XzX+gCPmy2lGdLfqEFntLau6A/uH0EMVBnB0qhKf2LeUc+t0uemdURguICeKQiR3 tFEbC+yDunZyj2TpJLl0c+yAPQZvmCjULRqRBvyWbN0Ehkz7PXN+dDO+iT2ECtOw KfHpTMJBwYvkxjFzzAZxQ4QVqcAMqc4XtBRWxeRyqntKwJ2xYCET7cvyUAlt0khO Qjmz17DDR3AVGHpn2LIxmp2pUx8/thfoNMDR477AL51WKrESibIpPhvX5Tk3LpyY GJJhtr5cqYJUZLSYnqXgp3U6ZmO4uA3DwuvCp8kY7/YcLTysx8wj4xl488c4fmfc LTDmBcfL2lAld8BcXHtXkuKFOIkzaBpybDEUnVbigQ5gxkL9bKrK2Ew2W+Wef56D JHiRfXEG5GoxIrQ42ojXew92fIpt47f71Y7VXhmVYaGrumr1C6CYTh2GhlzpbDQa fyzHNPPUulsW4qRSmrF5 =cks2 -----END PGP SIGNATURE-----
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos