LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I stop services printing messages to my terminal? (http://www.linuxquestions.org/questions/linux-software-2/how-do-i-stop-services-printing-messages-to-my-terminal-854765/)

William (Dthdealer) 01-07-2011 12:40 AM

How do I stop services printing messages to my terminal?
 
Hello fellow Linux users,

Every now and then on my non-graphical console-orientated Debian Squeeze system, some services see it fit to spill their juices all over what I am doing.

A message about a service stopping/starting/restarting prints at the location of my cursor ontop of whatever I was doing at that moment, forcing me to either redraw ( if the currently running application supports it ), background and then foreground what I'm doing or clear the screen if at the shell.

Common examples:
Code:

* Restarting OpenBSD Secure Shell server sshd
 * Restarting advanced system logger rsyslogd

How can I stop these messages appearing? Even better would be to send them to /dev/tty8 where I've configured rsyslogd to write.

Thanks in advance

Regards, William

unSpawn 01-07-2011 09:51 AM

Quote:

Originally Posted by William (Dthdealer) (Post 4216091)
How can I stop these messages appearing?

'man dmesg': 'dmesg -n [level]' where level is whatever kernel.h defines in 'man 2 syslog' (between 0 and 7).


Quote:

Originally Posted by William (Dthdealer) (Post 4216091)
send them to /dev/tty8 where I've configured rsyslogd to write.

If they are not already duplicates of what you configured in your daemon configuration files or /etc/rsyslog.conf then they just are inconsequential console output.

William (Dthdealer) 01-07-2011 09:55 PM

Quote:

Originally Posted by unSpawn (Post 4216486)
'man dmesg': 'dmesg -n [level]' where level is whatever kernel.h defines in 'man 2 syslog' (between 0 and 7).

Thankyou - I've now set my console loglevel to 6 instead of its default 7. Also from what I read, messages have a loglevel between & including 0 to 7, while the user chooses a loglevel between & including 1 to 8. The reason behind this is messages < loglevel ( as opposed to <= ) are displayed.



Quote:

If they are not already duplicates of what you configured in your daemon configuration files or /etc/rsyslog.conf then they just are inconsequential console output.
I don't know then why the default loglevel is set to 7 so these messages are printed. Most users do not care, and as you say, they are inconsequential.

Regards, William


All times are GMT -5. The time now is 10:13 PM.