# A repeating message



## yonnie (Jul 1, 2018)

The "username" last message repeated 9 times.  And then it repeats again, and again, and again.
  It even gets into my attempts to edit files, so I am considering this quite disruptive.  I need to understand why I'm seeing this and how to manage it.


----------



## Chris_H (Jul 2, 2018)

Just a hunch. But are you logging on as root?
If so; this would explain the "disruptive" text sent to the console.
Short answer; don't log on as root. 

--Chris


----------



## ShelLuser (Jul 2, 2018)

yonnie said:


> The "username" last message repeated 9 times.  And then it repeats again, and again, and again.


What is that suppose to mean though? Can you give us an example of some sort? Don't assume that we also have the same problem and thus know what you're talking about 

So something appears on your screen. Are you logged onto the console? v0? (use the `tty` command to find out)? Because that can be easily explained, just take a look at a default /etc/syslog.conf:

```
*.err;kern.warning;auth.notice;mail.crit                /dev/console
```
See what I mean?  Every error, every kernel warning, every message related to authentication and critical mail messages will get relayed to and thus shown on the console.

If this is what's happening to you then the solution is very simple: switch to the second console. So: alt-f2,  then use that to log on. You'll end up on v1 which isn't the main console which means no messages will be dumped there.

However, I have an even more elegant solution, one which I use on most of my servers and my laptop alike: a logging tty. So: no (or very few) messages get sent to the console and most only find their way onto v7.

So:

Edit /etc/ttys and uncomment (don't remove!) the ttyv7 line.
This will prevent you from logging onto the system on v7, so: alt-f7.

Edit /etc/syslog.conf and change /dev/console into /dev/ttyv7.
Now, changes in ttys aren't instant as far as I remember so it's probably easiest to reboot. Though killing getty might also do the trick. Of course if you do things manually also restart syslogd.

The result will be that every nasty intruding message now gets sent onto the other virtual console. Using alt-f7 will show you all the messages which the system received. On a server it might be useful to also store all of this in a file of some sort, there's an example entry for /var/log/console which you might like to use.

For example, this is what my server uses:


```
*.err;mail.crit                                 /dev/console
*.err;kern.warning;auth.notice;mail.crit        /dev/ttyv7
```
Oh: and if the intruding messages where bright white then those are kernel logs. There's probably a sysctl option to turn those off but I have no idea from mind which one.


----------



## k.jacker (Jul 2, 2018)

Those messages aren't very informative themselves.
They just inform you about the last message has been repeated N times... (instead of really showing the same message N times)

The message of interest is therefor the message BEFORE those messages started.
Check that and you'll get a hint what they are all about..
Ask back here when you need help fixing a problem.

I'd do the following:
Scroll back the console by pressing the "Scroll lock" key on your keyboard and then use the up/down arrow keys to browse through...
To avoid those messages from disrupting you from editing files, just switch to the next one console (ttyv1) by pressing CTRL+ALT+F2.
Reboot the machine and then look for the message right from the start, can also be a bit easier.


----------



## elgrande (Nov 27, 2022)

Sorry for bringing this up again.

I am trying to redirect console output to ttyv1 by the following change in /etc/syslog.conf:

```
#*.err;kern.warning;linux.none;auth.notice;mail.crit            /dev/console
*.err;kern.warning;linux.none;auth.notice;mail.crit             /dev/ttyv1
```

Anyhow the messages (e.g. when attaching an usb device) still pop up at ttyv0.
Does anyone have an idea what I am doing wrong?


----------

