LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Disable errors output to console (https://www.linuxquestions.org/questions/linux-software-2/disable-errors-output-to-console-465014/)

Tushar Pednekar 07-17-2006 07:44 PM

Disable errors output to console
 
Hi,

I want to disable the output (errors, warnings) usually sent to the console. How do i do it. I know that it is logged and hence do not want to worry about the output. Just want to disable the console error messages. I know there are variables one can set to the klog daemon to do that - or is it not - but dont know where to set it.

Please help.

Regards,
Tushar

pljvaldez 07-17-2006 08:03 PM

Do you want to disable all errors or just for specific scripts/cronjobs. If it's just a script/cronjob, redirect the standard output to /dev/null.
Code:

your_shell_script >> /dev/null 2>&1

Tushar Pednekar 07-17-2006 08:10 PM

Actually i got the solution.

modify /etc/init.d/klog file and find the entry for /sbin/klog. modify the command to reflect the following

/sbin/klog -c <Msg Priority>

example: /sbin/klog -c 3 will disable all messages with priorities 3 and higher and allow only messages with priority 0 to 2.

Regards,
Tushar


All times are GMT -5. The time now is 03:53 AM.