LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-11-2013, 12:06 PM   #1
ovod88
Member
 
Registered: Apr 2010
Posts: 53

Rep: Reputation: 15
Too many mingetty opened


Hi/ I have Centos 6.2. When I issue the command:
ps aux | grep tty
root 1541 0.0 0.0 1980 468 tty1 Ss+ 2012 0:00 /sbin/mingetty /dev/tty1
root 15013 0.0 0.0 1980 484 tty2 Ss+ 17:35 0:00 /sbin/mingetty /dev/tty2
root 15015 0.0 0.0 1980 512 tty4 Ss+ 17:35 0:00 /sbin/mingetty /dev/tty4
root 15016 0.0 0.0 1980 476 tty5 Ss+ 17:35 0:00 /sbin/mingetty /dev/tty5
root 17406 0.0 0.0 1980 476 tty3 Ss+ 18:47 0:00 /sbin/mingetty /dev/tty3
root 17508 0.0 0.0 1976 544 ? Ss 18:58 0:00 /sbin/mingetty /dev/tty6
I see too many opened by init getties/ I want to turn down four of them leaving only tty1 and tty2. Please help me to do it. Modifying /etc/init/start-ttys.conf or /etc/init/tty.cong does not help. I may do something wrong since after killing process (for example tty3) init respawns it immediately(((
 
Old 01-11-2013, 01:43 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
It should respawn it.

/etc/sysconfig/init defines the number of virtual terminals started.

By default the file has
Code:
...
ACTIVE_CONSOLES=/dev/tty[1-6]
...
Change the 6 to a 2.

You can try doing a "telinit -q" to cause a reload of the configuration. IF this doesn't stop the excess virtual terminals, you can reboot.

The extra virtual terminals are no load on the system though, and it only saves a couple of Kb of memory. The buffers used by the virtual terminals will be used anyway, and sometimes it is desirable to have more than two (one to be actively doing something, one to look at status, another to check man pages/documents...)
 
Old 01-12-2013, 06:43 PM   #3
ovod88
Member
 
Registered: Apr 2010
Posts: 53

Original Poster
Rep: Reputation: 15
Unfortunatelly I tried both (changing sysconfig of init fom 6 to 2, telinit -q, init -q). I even change inittab with option off for 3-6 tty. Negative((( Init still respawns it anyway))) I am doing it not because of load on cpu or something, just interest how to do such thing.
 
Old 01-13-2013, 05:27 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Sorry. There is a bug in 6.2.

The file /etc/init/start-ttys.conf SHOULD use the configuration specified in /etc/sysconfig/init, but doesn't.

The file instead has:
Code:
#
# This service starts the configured number of gettys.

start on stopped rc RUNLEVEL=[2345]

env ACTIVE_CONSOLES=/dev/tty[1-6]
env X_TTY=/dev/tty1
task
script
	. /etc/sysconfig/init
	for tty in $(echo $ACTIVE_CONSOLES) ; do
		[ "$RUNLEVEL" = "5" -a "$tty" = "$X_TTY" ] && continue
		initctl start tty TTY=$tty
	done
end script
Which hardwires the ACTIVE_CONSOLES instead of using the configured value.

Change the 6 to a 2, and reboot. The reboot requirement is also a bug.

Expect all of this to potentially change when CentOS 7 comes around.
 
1 members found this post helpful.
Old 01-14-2013, 02:01 AM   #5
ovod88
Member
 
Registered: Apr 2010
Posts: 53

Original Poster
Rep: Reputation: 15
Yeap. It helped. Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mingetty problem aklisamil Linux - Software 1 06-22-2011 08:36 AM
mingetty problems menzbua Linux - Server 1 06-05-2009 07:49 AM
Autologin using mingetty tuesday Linux - General 20 04-10-2008 01:21 AM
What is /sbin/mingetty? stakhous Linux - Newbie 2 03-12-2008 12:56 PM
mingetty question... davidkline Linux - Newbie 1 01-28-2006 02:01 PM


All times are GMT -5. The time now is 07:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration