> Von: Karel Zak [mailto:kzak@xxxxxxxxxx] > Gesendet: Montag, 7. Februar 2011 16:17 > > On Fri, Jan 28, 2011 at 02:15:20PM +0100, WUEBBELS, Josef > (Extern) wrote: > > I hope you will find the following patch useful. > > Why we need this patch? I think that locally running syslogd > is able to redirect the logs to remote syslog server. Of course, for normal operations using syslogd is the best way. But there a also several occasions where this patch is quite useful: Personally I find it quite useful for checking remote syslog servers by sending a short test message because I do not have to setup syslogd each time. In our environment we use it because we also have a lot of standardized servers which we do not want to reconfigure very often (would be a real pain). On these servers a lot of unprivileged users run custom applications and self-made shell scripts. Thus this patch is a low effort way to allow these users to log messages to their central syslog servers. > > The patch looks fine to me, but it'd be nice to have an update to > logger.8 man page too. sorry, here it is: --- a/misc-utils/logger.1 2010-05-19 23:36:23.000000000 +0200 +++ b/misc-utils/logger.1 2011-02-08 07:36:18.222200561 +0100 @@ -46,6 +46,8 @@ .Op Fl p Ar pri .Op Fl t Ar tag .Op Fl u Ar socket +.Op Fl n Ar server +.Op Fl P Ar udpport .Op Ar message ... .Sh DESCRIPTION .Nm Logger @@ -83,6 +85,14 @@ instead of builtin syslog routines. .It Fl d Use a datagram instead of a stream connection to this socket. +.It Fl n Ar serv +Write to remote syslog server using UDP as specified with +.Ar server +instead of builtin syslog routines. +.It Fl P Ar port +Change UDP port to the value as specified with +.Ar udpport . +Default port number is 514. .It -- End the argument list. This is to allow the .Ar message @@ -114,6 +124,8 @@ logger System rebooted logger \-p local0.notice \-t HOSTIDM \-f /dev/idmc + +logger \-n loghost.example.com System rebooted .Ed .Sh SEE ALSO .Xr syslog 3 , --- Regards, Josef -- MTU Aero Engines GmbH Geschaeftsfuehrung/Board of Management: Egon W. Behle, Vorsitzender/CEO; Dr. Rainer Martens, Dr. Stefan Weingartner, Reiner Winkler Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt Sitz der Gesellschaft/Registered Office: Muenchen Handelsregister/Commercial Register: Muenchen HRB 154230 Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet. This e-mail and any attached documents are proprietary to MTU, confidential or protected by law. If you are not the intended recipient, please advise the sender and delete this message and its attachments. Any unauthorised storing, copying or distribution is prohibited. -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html