1830730 Members
2308 Online
110015 Solutions
New Discussion

abnormal mgetty logs

 
SOLVED
Go to solution
Laszlo Csizmadia
Frequent Advisor

abnormal mgetty logs

I have a lot of mgetty log file in /var/log?
Like:
[root@buda root]# ll /var/log/mgetty.log.ttyS0.1.2.1.1.1.1.1.2.4.1.1.2.1.1.1.1
-rw-r--r-- 1 root root 0 Jan 5
12:53 /var/log/mgetty.log.ttyS0.1.2.1.1.1.1.1.2.4.1.1.2.1.1.1.1

Zero lenght but there is a lot:
[root@buda root]# find /var/log -name "mgetty.log.ttyS0*" -type f -print|wc -l
1309789

Where is this comming from?
[root@buda root]# rpm -qa mgetty
mgetty-1.1.28-3
[root@buda root]# grep mgetty /etc/inittab
S0:2345:respawn:/sbin/mgetty -r -s 9600 /dev/ttyS0 vt100
[root@buda root]# uname -r
2.4.18-27.7.xsmp

System is RedHat 7.3.

I will appreciate any help. Thanks.
1 REPLY 1
Bill Wood_3
Respected Contributor
Solution

Re: abnormal mgetty logs

There is a problem with the entry in /etc/logrotate.d/mgetty

Workaround:

First, remove existing mgetty log files with the command:

find /var/log -name 'mgetty.log.ttyS0.*' -print | xargs rm -fr

Second, correct the mgetty configuration file in logrotate.d

From:

/var/log/mgetty.log.tty* {
nocompress
missingok
}

To:

/var/log/mgetty.log.ttyS0 {
nocompress
missingok
}