Koozali.org: home of the SME Server

hundreds of mgetty.log.ttyS's

Meert

hundreds of mgetty.log.ttyS's
« on: April 23, 2003, 06:11:11 PM »
Currently I'm trying to rebuild my server, but I found that there are hundreds of files in my /var/log/ called mgetty.log.ttyS*.*.*

searching Google I found this:

Currently the logrotate.d file for mgetty looks like this:
/var/log/mgetty.log.tty* {
        nocompress
           missingok
      }

This contains a subtle error. Let us say we start with the logfile:
mgetty.log.ttySO

the next round will give us:
mgetty.log.ttySO and mgetty.log.ttySO.1

So far so good. But the next time we will get:
mgetty.log.ttySO mgetty.log.ttySO.1 mgetty.log.ttySO.1.1

In the end you get hundreds of files with name like:
mgetty.log.ttySO.1.1.2.1.3

The first line in the mgetty file should be:
/var/log/mgetty.log.ttySO or /var/log/mgetty.log.ttyS?
or have two clauses. One mgetty.log.ttySO and one mgetty.log.ttyS2 if
necessary.

Gene Cooper

Re: hundreds of mgetty.log.ttyS's
« Reply #1 on: April 23, 2003, 09:58:52 PM »
First, I'll tell you I had a HUGE problem created by this issue.  If that /var/log directory get's too many entries, you can't even list it!

I had a problem where (I think) the modem was installed incorrectly and there were tens of thousands of those messages created.  I found that the newer E-Smith versions generally utomatically detect PCI modems and serial cards.  They almost always seem to be detected as ttyS4 and ttyS5 (for dual-port serial cards).

I added a cron entry to periodically clean out all mgetty.log.ttySx.* log files.

G