|
|
How do I silence or filter a system log message?
|
|
|
|
Forum Regular
Join Date: Jan 2002
Status:
Offline
|
|
In order to keep my systen.log file as small as possible (mine is 452 Kb right now), i wonder if it is possible to filter what messages the system should write to its log files.
I am not sure it would make any difference in terms of speed, but when i want to consult my huge system.log file, the case is it's sometimes hard to find what i want!
Some of those messages are really obstructive, like the almost constant 'fix-prebinding error'. Another case is the messages from the Renicer utility, which sends a message line to system.log each time it renices something.
And those messages happen dozens of times each day! For example, Renicer does it each time i switch to another app!
Well, i would like to shut those useless messages off. How can i do that?
PS.I am a kind of unix newbie, so please explain it the easy way...
Thanks
vic
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status:
Offline
|
|
The file /etc/syslog.conf controls what messages get logged and where.
You can edit this file to reduce the log level.
Each line in the file consists of a number of message levels followed by the path of the file the messages should be logged to.
For example, a typical system.log entry might look like:
*.notice;*.info;authpriv,remoteauth,ftp.none;kern. debug;mail.crit /var/log/system.log
meaning all ".notice', ".info", authpriv, and remoteauth messages, as well as generic ftp messages (ftp.none), kernel debug messages (kern.debug), and critical mail messages (mail.crit) are logged to /var/log/system.log
The trouble is that 'fix-prebinding' messages are, I believe, in the category 'kern.debug'.
Disabling this category (by removing the entry from this line) will also filter other kernel messages that might be more important.
If you truly want to remove these messages, remove the kern.debug from the /var/log/system.log line, then:
killall -HUP syslog
to have the changes take effect.
Alternatively, you can try to fix the problem that's causing the messages to log in the first place. Prebinding issues can usually be fixed by running:
sudo update_prebinding -root /
in a terminal window and letting it do it's job.
|
Gods don't kill people - people with Gods kill people.
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 2000
Location: Caracas, Bolivarian Republic Of Venezuela
Status:
Offline
|
|
As Camelot, said - it's the /etc/syslog.conf file.
Comment out the line that ends with '/var/log/system.log' (put a # at the beginning) and put this line in:
Code:
*.crit /var/log/system.log
Then type in the terminal:
Code:
sudo killall -HUP syslogd
This way only truly important messages will be logged.
|
Contra a barbárie, o estudo; Contra o individualismo, a solidariedade!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|