>________________________________ > From: Rainer Gerhards <[email protected]> >To: marty <[email protected]>; rsyslog-users <[email protected]> >Sent: Friday, July 20, 2012 9:38 AM >Subject: RE: [rsyslog] using omstdout plugin > > > >> -----Original Message----- >> From: [email protected] [mailto:rsyslog- >> [email protected]] On Behalf Of marty >> Sent: Thursday, July 19, 2012 11:21 PM >> To: [email protected] >> 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] > >Rainer >> >> : root@primergy 05:14:30;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 13789 syslog mem REG 8,6 37820 484214 >> /usr/lib/rsyslog/omstdout.so >> >> >> 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 >> do >> 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?) >> >> Marty >> _______________________________________________ >> rsyslog mailing list >> http://lists.adiscon.net/mailman/listinfo/rsyslog >> http://www.rsyslog.com/professional-services/ >> 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@primergy 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@primergy 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: $ModLoad oms Is there a way to run rsyslogd single treaded so its easier to run thinks like strace? marty _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards

