<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Syslog</id>
	<title>Syslog - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Syslog"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Syslog&amp;action=history"/>
	<updated>2026-05-03T21:29:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Syslog&amp;diff=8259&amp;oldid=prev</id>
		<title>Kenneth: Created page with &quot;==Syslog== Linux system logging.  ===Settings===  [facility].[priority];[...]   [log file]  /etc/syslog.conf:  *.info;mail.none;authpriv.none;cron.none                -/var/log/messages  The &quot;-&quot; indicates that the message should not be buffered.  ===Facilities=== The  facility  is  one of the following keywords: :auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark, news, security (same as auth), syslog, user, uucp, and local0 through local7.  ===Priorities=== The pr...&quot;</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Syslog&amp;diff=8259&amp;oldid=prev"/>
		<updated>2025-01-01T22:46:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Syslog== Linux system logging.  ===Settings===  [facility].[priority];[...]   [log file]  /etc/syslog.conf:  *.info;mail.none;authpriv.none;cron.none                -/var/log/messages  The &amp;quot;-&amp;quot; indicates that the message should not be buffered.  ===Facilities=== The  facility  is  one of the following keywords: :auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark, news, security (same as auth), syslog, user, uucp, and local0 through local7.  ===Priorities=== The pr...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Syslog==&lt;br /&gt;
Linux system logging.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
 [facility].[priority];[...]   [log file]&lt;br /&gt;
&lt;br /&gt;
/etc/syslog.conf:&lt;br /&gt;
 *.info;mail.none;authpriv.none;cron.none                -/var/log/messages&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;-&amp;quot; indicates that the message should not be buffered.&lt;br /&gt;
&lt;br /&gt;
===Facilities===&lt;br /&gt;
The  facility  is  one of the following keywords:&lt;br /&gt;
:auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark, news, security (same as auth), syslog, user, uucp, and local0 through local7.&lt;br /&gt;
&lt;br /&gt;
===Priorities===&lt;br /&gt;
The priority is one of the  following  keywords,  in  ascending  order:&lt;br /&gt;
:debug,  info, notice, warning, warn (same as warning), err, error (same as err), crit, alert, emerg,  panic  (same  as  emerg).&lt;br /&gt;
&lt;br /&gt;
===Force a log message===&lt;br /&gt;
Log a message:&lt;br /&gt;
 logger &amp;lt;message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MARK===&lt;br /&gt;
The default interval between &amp;quot;-- MARK --&amp;quot; is 20 minutes.&lt;br /&gt;
&lt;br /&gt;
To change /etc/sysconfig/syslog:&lt;br /&gt;
 # -m 0 disables &amp;#039;MARK&amp;#039; messages.&lt;br /&gt;
 SYSLOGD_OPTIONS=&amp;quot;-m 60&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 -m interval&lt;br /&gt;
    The syslogd logs a mark timestamp regularly.  The default inter-&lt;br /&gt;
    val between two -- MARK -- lines is 20  minutes.   This  can  be&lt;br /&gt;
    changed with this option.  Setting the interval to zero turns it&lt;br /&gt;
    off entirely.&lt;br /&gt;
&lt;br /&gt;
NOTE: &amp;quot;syslogd doesn&amp;#039;t bother to write a mark if something else causes it to write a log entry during the interval you specified&amp;quot; [http://aplawrence.com/Blog/B935.html]&lt;br /&gt;
&lt;br /&gt;
=== Remote logging ===&lt;br /&gt;
&lt;br /&gt;
On the receiving server /etc/sysconfig/syslog:&lt;br /&gt;
 # -m 0 disables &amp;#039;MARK&amp;#039; messages.&lt;br /&gt;
 # -r enables logging from remote machines&lt;br /&gt;
 SYSLOGD_OPTIONS=&amp;quot;-r -m 20&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Open firewall:&lt;br /&gt;
 # /etc/services&lt;br /&gt;
 syslog		514/udp&lt;br /&gt;
&lt;br /&gt;
 -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 514 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
On client /etc/syslog.conf:&lt;br /&gt;
 # partial remote logging:&lt;br /&gt;
 *.info;mail.none;authpriv.none;cron.none                -/var/log/messages&lt;br /&gt;
 *.info;mail.none;authpriv.none;cron.none                @10.161.101.70&lt;br /&gt;
&lt;br /&gt;
 # full remote logging:&lt;br /&gt;
 *.*		@10.10.10.3&lt;br /&gt;
&lt;br /&gt;
Remote Syslog:&lt;br /&gt;
*http://www.snort.org/docs/faq/1Q05/node50.html&lt;br /&gt;
*http://www.chinalinuxpub.com/doc/www.siliconvalleyccie.com/linux-hn/logging.htm&lt;br /&gt;
*http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch05_:_Troubleshooting_Linux_with_syslog&lt;br /&gt;
*http://linux.die.net/man/5/syslog.conf&lt;br /&gt;
*http://librenix.com/?inode=2831&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
Send a remote syslog: [http://linux.byexamples.com/archives/412/syslog-sending-log-from-remote-servers-to-syslog-daemon/]&lt;br /&gt;
 nc -w0 -u [SERVER] 514 &amp;lt;&amp;lt;&amp;lt; &amp;quot;logging from remote&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To assign your message a PRI, you need to specified PRI’s value in numeric. User.Info’s PRI value is: (1 &amp;lt;&amp;lt; 3 ) + 6 = 8 + 6 = 14. ( refers back the numerical code of facility and severity )&lt;br /&gt;
 nc -w0 -u 192.168.1.1 514 &amp;lt;&amp;lt;&amp;lt; &amp;quot;&amp;lt;14&amp;gt;User Info msg from remote&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If your rsyslogd are listening to TCP port, just ignore -w0 and -u:&lt;br /&gt;
 nc 192.168.1.1 514 &amp;lt;&amp;lt;&amp;lt; &amp;quot;&amp;lt;14&amp;gt;User Info msg from remote through TCP.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== keywords ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>