Peace, I have messages like (on a centos 3.8 box)
NET: 21 messages suppressed. martian source 10.255.255.255 from 10.0.0.138, on dev eth0
on my screen. In the same time it is being logged to a file. Are there any way to stop the logging of these messages on the console and still logged to a file (/var/log/messages)
Thank you.
Hameed
Abd El-Hameed Ayad wrote:
Peace, I have messages like (on a centos 3.8 box)
NET: 21 messages suppressed. martian source 10.255.255.255 from 10.0.0.138, on dev eth0
on my screen. In the same time it is being logged to a file. Are there any way to stop the logging of these messages on the console and still logged to a file (/var/log/messages)
Add a pound sign to the head of any lines that end in /dev/console in /etc/syslog.conf
eg:
#kern.* /dev/console
If you really want all kernel messages logged to a file, you can change the above to point to /var/log/kern (that is, you don't have to comment it out with a pound sign) and create appropriate entries in the log rotation configuration.
Thank you very much for your concern. Here is a snapshot of my syslog.conf file (pound sign already exists)
# Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.* /dev/console
# Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access. authpriv.* /var/log/secure
# Log all the mail messages in one place. mail.* -/var/log/maillog
# Log cron stuff cron.* /var/log/cron
# Everybody gets emergency messages *.emerg *
# Save news errors of level crit and higher in a special file. uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log local7.* /var/log/boot.log
Hameed
Feizhou wrote:
Abd El-Hameed Ayad wrote:
Peace, I have messages like (on a centos 3.8 box)
NET: 21 messages suppressed. martian source 10.255.255.255 from 10.0.0.138, on dev eth0
on my screen. In the same time it is being logged to a file. Are there any way to stop the logging of these messages on the console and still logged to a file (/var/log/messages)
Add a pound sign to the head of any lines that end in /dev/console in /etc/syslog.conf
eg:
#kern.* /dev/console
If you really want all kernel messages logged to a file, you can change the above to point to /var/log/kern (that is, you don't have to comment it out with a pound sign) and create appropriate entries in the log rotation configuration. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hi Hameed,
Abd El-Hameed Ayad wrote:
Thank you very much for your concern. Here is a snapshot of my syslog.conf file (pound sign already exists)
# Everybody gets emergency messages *.emerg *
Okay. change this line. Instead of sending to everybody...just log to /var/log/messages or something.
Thank you very much for your concern. i had change it, restarted syslog But still getting messages on console
any other ideas.
Thanx hameed
Feizhou wrote:
Hi Hameed,
Abd El-Hameed Ayad wrote:
Thank you very much for your concern. Here is a snapshot of my syslog.conf file (pound sign already exists)
# Everybody gets emergency messages *.emerg *
Okay. change this line. Instead of sending to everybody...just log to /var/log/messages or something. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 19/09/06, Abd El-Hameed Ayad hamid@use-trade.com wrote:
Thank you very much for your concern. i had change it, restarted syslog But still getting messages on console
I use kernel debug to get iptables messages into a separate log file and off the console...
# /etc/syslogd.conf Send iptables LOG to iptables.log kern.=debug /var/log/iptables.log
The add "--log-level debug" to any iptables rules you want logged. We do use a separate iptables setup script based on the O'Reilly bastion_firewall script on most hosts though, integrating this method with the default iptables setup may required some fiddling.
Will.
Abd El-Hameed Ayad wrote:
Thank you very much for your concern. i had change it, restarted syslog But still getting messages on console
any other ideas.
What other line do you have in syslog.conf that has * or /dev/console at the end?
On Mon September 18 2006 05:00, Abd El-Hameed Ayad wrote:
Are there any way to stop the logging of these messages on the console and still logged to a file (/var/log/messages)
Here is what I did.
Edit and add the following to sysctl.conf;
# Stop logging to console kernel.printk = 3 4 1 7
then run 'sysctl -p' so that it will take effect.
To get it working at boot time i added the following to syscrl.conf;
sysctl -p
I now see no logging to the console anymore.
Thank you.
Hameed
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos