martyleisner at yahoo
Jul 20, 2012, 1:30 PM
Post #3 of 7
> From: Rainer Gerhards <rgerhards [at] hq>
>To: marty <martyleisner [at] yahoo>; rsyslog-users <rsyslog [at] lists>
>Sent: Friday, July 20, 2012 9:38 AM
>Subject: RE: [rsyslog] using omstdout plugin
>> -----Original Message-----
>> From: rsyslog-bounces [at] lists [mailto:rsyslog-
>> bounces [at] lists] On Behalf Of marty
>> Sent: Thursday, July 19, 2012 11:21 PM
>> To: rsyslog [at] lists
>> Subject: [rsyslog] using omstdout plugin
>> I'm new to rsyslogd. I want to write a plugin.
>> I understand if I use the omstdout plugin, all output will be redirected to stdout.
>> I have it loaded and I haven't seen anything. I'm using ubuntu 11.10
>> (rsyslog 5.8.1). I got the source, and compiled the omstdout plugin.
>That's a testbench plugin. I don't see any valid use on a production system for it. In any case, if you use it, you must run rsyslogd interactively in a terminal window.
>[use -n to prevent auto-backgrounding in that case]
>> : root [at] primerg 05:14:30;lsof -p $(pidof rsyslogd) | grep omstdout
>> lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system
>> Output information may be incomplete.
>> rsyslogd 13789 syslog mem REG 8,6 37820 484214
>> In order to see stdout, I have to run
>> rsyslogd -d?
>> When I do this I see nothing (I tried
>> echo hi >/dev/kmsg)
>> which appears in my logs, but not my screen. Is there anything special I have to
>> to see the logging output on the screeN/
>> When I do
>> export RSYSLOG_DEBUG=NoStdOut
>> it seems the -d option is negated (i.e. forks into background).
>> Is there a way NOT to fork (and not have verbose output?)
>> rsyslog mailing list
>> What's up with rsyslog? Follow https://twitter.com/rgerhards
Thanks a lot -- I didn't see the -n option (RTFM) (not "grep fork").
I just want to use omstdout to see a plugin working, see if I can modify it then write
the plugin I want.
But I still can't seem to get it to work.
: root [at] primerg 03:56:23;rsyslogd -n
rsyslogd: WARNING: rsyslogd is running in compatibility mode. Automatically generated config directives may interfer with your rsyslog.conf settings. We suggest upgrading your config and adding -c5 as the first rsyslogd option.
rsyslogd: Warning: backward compatibility layer added to following directive to rsyslog.conf: ModLoad immark
rsyslogd: Warning: backward compatibility layer added to following directive to rsyslog.conf: MarkMessagePeriod 1200
rsyslogd: Warning: backward compatibility layer added to following directive to rsyslog.conf: ModLoad imuxsock
: root [at] primerg 04:12:29;lsof -p $(pidof rsyslogd) | grep omstdout
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/leisner/.gvfs
Output information may be incomplete.
rsyslogd 28125 syslog mem REG 8,6 37820 484214 /usr/lib/rsyslog/omstdout.so
using logger and /dev/kmsg, I put messages in the log files, but I don't see anything on stdout.
Do I have to do anything besides:
Is there a way to run rsyslogd single treaded so its easier to run thinks like strace?
rsyslog mailing list
What's up with rsyslog? Follow https://twitter.com/rgerhards