Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: RSyslog: users

using omstdout plugin

 

 

RSyslog users RSS feed   Index | Next | Previous | View Threaded


martyleisner at yahoo

Jul 19, 2012, 2:20 PM

Post #1 of 7 (529 views)
Permalink
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.

: root [at] primerg 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


rgerhards at hq

Jul 20, 2012, 6:38 AM

Post #2 of 7 (515 views)
Permalink
Re: using omstdout plugin [In reply to]

> -----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]

Rainer
>
> : root [at] primerg 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
_______________________________________________
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


martyleisner at yahoo

Jul 20, 2012, 1:30 PM

Post #3 of 7 (523 views)
Permalink
Re: using omstdout plugin [In reply to]

>________________________________
> 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]
>
>Rainer
>>
>> : root [at] primerg 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 [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:
$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


david at lang

Jul 20, 2012, 1:35 PM

Post #4 of 7 (524 views)
Permalink
Re: using omstdout plugin [In reply to]

On Fri, 20 Jul 2012, marty wrote:

>
> 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

you need to deal with these errors before you try anything else.
"compatibility mode" is rsyslog version1 or thereabouts, most stuff
doesn't work in this mode.

instead of doign rsyslogd -n do rsyslogd -c5 -n

It may be about time to break backwards compatibility and assume that you
are reading a config file that's reasonably current and no longer require
the -c option for every startup.

David Lang

>
>
> : 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:
> $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
>


martyleisner at yahoo

Jul 20, 2012, 3:01 PM

Post #5 of 7 (509 views)
Permalink
Re: using omstdout plugin [In reply to]

----- Original Message -----

> From: "david [at] lang" <david [at] lang>
> To: marty <martyleisner [at] yahoo>; rsyslog-users <rsyslog [at] lists>
> Cc: Rainer Gerhards <rgerhards [at] hq>
> Sent: Friday, July 20, 2012 4:35 PM
> Subject: Re: [rsyslog] using omstdout plugin
>
> On Fri, 20 Jul 2012, marty wrote:
>
>>
>> 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
>
> you need to deal with these errors before you try anything else.
> "compatibility mode" is rsyslog version1 or thereabouts, most stuff
> doesn't work in this mode.
>
> instead of doign rsyslogd -n do rsyslogd -c5 -n
>
> It may be about time to break backwards compatibility and assume that you
> are reading a config file that's reasonably current and no longer require
> the -c option for every startup.
>
> David Lang
>
>>
>>


Ok, I tried that.

Now I don't have anything appearing on stdout -- and logger logs to files but not stdout.

I ran it under strace and just saw logging to files.

I check the /proc entries and it all seems to "make sense".

I'm runnng a ubuntu 11.10 -- I'm running the distributed rsyslogd 5.81 and a rsyslogd 5.81 I built.

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


david at lang

Jul 20, 2012, 3:18 PM

Post #6 of 7 (516 views)
Permalink
Re: using omstdout plugin [In reply to]

On Fri, 20 Jul 2012, marty wrote:

> ----- Original Message -----
>
>> From: "david [at] lang" <david [at] lang>
>> To: marty <martyleisner [at] yahoo>; rsyslog-users <rsyslog [at] lists>
>> Cc: Rainer Gerhards <rgerhards [at] hq>
>> Sent: Friday, July 20, 2012 4:35 PM
>> Subject: Re: [rsyslog] using omstdout plugin
>>
>> On Fri, 20 Jul 2012, marty wrote:
>>
>>>
>>> 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
>>
>> you need to deal with these errors before you try anything else.
>> "compatibility mode" is rsyslog version1 or thereabouts, most stuff
>> doesn't work in this mode.
>>
>> instead of doign rsyslogd -n do rsyslogd -c5 -n
>>
>> It may be about time to break backwards compatibility and assume that you
>> are reading a config file that's reasonably current and no longer require
>> the -c option for every startup.
>>
>> David Lang
>>
>>>
>>>
>
>
> Ok, I tried that.
>
> Now I don't have anything appearing on stdout -- and logger logs to files but not stdout.
>
> I ran it under strace and just saw logging to files.
>
> I check the /proc entries and it all seems to "make sense".
>
> I'm runnng a ubuntu 11.10 -- I'm running the distributed rsyslogd 5.81 and a rsyslogd 5.81 I built.

try running it in debug mode

I really don't know anything about that plugin, from Rainer's comment it's
intended only for testing, so it's probably not a good one to look at as a
template for future development (for example, I'm pretty sure it's not
going to implement batch mode correctly)

David Lang
_______________________________________________
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


rgerhards at hq

Jul 30, 2012, 1:39 AM

Post #7 of 7 (477 views)
Permalink
Re: using omstdout plugin [In reply to]

> Ok, I tried that.
>
> Now I don't have anything appearing on stdout -- and logger logs to
> files but not stdout.
>
> I ran it under strace and just saw logging to files.
>
> I check the /proc entries and it all seems to "make sense".
>
> I'm runnng a ubuntu 11.10 -- I'm running the distributed rsyslogd 5.81
> and a rsyslogd 5.81 I built.

Omstdout *really* is just a testbench aid. Nobody uses it, and that for good reasons. Usage examples can be found in the testbench und ./tests

I have no interest in supporting this module and I strongly recommend NOT basing any work on it.

Rainer
_______________________________________________
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

RSyslog users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.