Link to home
Start Free TrialLog in
Avatar of dmaroff
dmaroff

asked on

Too many ttys running

If I use the 'who' command I can see that I have about 5 ttys running, some as far back as a month ago.  Id like to be able to get rid of these ttys so I did a 'ps aux' looked up the pid #s and went to kill off these processes known as /sbin/mingetty (5 appeared) but they would just respawn.  Why would these 5 ttys be running in the firt place? I always log out of the shell.  How would I kill these ttys?  And what is the need for the mingetty process?

Thanks,
-Dan
Avatar of hotbot
hotbot

these tty are run at boot there are normal , you can ajust them run just one , but after that you can't run an another console on your machine you can run an other console by typing alt+f1 or f2 f3 f4 f5 ....
carefull if you are under xwindows you need to type alt+f7 if your are running 6 mgetty or alt+f6 if you run 5 mgetty .
sorry for my english

if this answer is ok for you PLEASE give me just 1 point for it knowledge is free :)
The consoles are started at boot time from /etc/rc.d acccording to the runlevel specified in your /etc/inittab. Mingetty (man mingetty)is the process which handles your login process.

To kill them, you need to edit your launch scripts (/etc/rc.d) to reflect on the number of ttys you want running. Then init q. The process respawns because of the /etc/inittab entry field respawn, which keeps the process up.
You need these ttys if you need to login as another user on the same machine (w/o using su) or for some debugging purposes. I uses these when I need to be using two applications in the foreground.

If you are running Xwindows, Ctrl + Alt + F1 (upto F6) will give you access to these text consoles. Xwindows will be running on Ctrl + Alt + F7. (This assumes six consoles running, if you have a different number, xwin = no. of consoles +1)

I hope that this is useful. (And of course, hotbot should get preference over me, hes given the answer firs, I merely rephrased it).
Avatar of dmaroff

ASKER

I thought getty was responsible for providing the login prompt?  Whats the difference If I get rid of all the /sbin/mingetty. Would it hurt?

Thanks,
-Dan
no mgetty give you console access
login give you login prompt , but login need a console .
to see the diff between mingetty and mgetty , read the man's
ASKER CERTIFIED SOLUTION
Avatar of munsie
munsie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
in regards to hotbot's answer...

technically, mingetty does provide the initial login: prompt.  It then takes the user name provided and passes it to login.  login provides the password prompt.  If the login attempt isn't successful, then login provides the follow up login: prompt.

This setup allows multiple mingettys to run without having to have login running.

dennis
Avatar of dmaroff

ASKER

You can't just get rid of them at random like 'munsie' has claimed because each line is associated with a run level.  I commented all but the line with run level #2 and the machine did boot with run level #2 but then reported that it had been reached and hung on me.

I thought I was screwed but I noticed that I could still use ALT-F? and still use other logins.  Just ALT-F1 has hung.
Why is that?

Are the mingetty's attached to the ALT-F?s somehow?

I looked up that getty is for logging in and mingetty is for virtual consoles, what does this mean?  

Thanks,
-Dan
the first column isn't run level, it's the identifier for the console on that tty.  The second column, the one with 2345 or 12345 in it is the run levels.  You want to remove all but the first one.  That's the default console, and it is started in all of the run levels (1-5).

the reason you can't use the f1 console is because you removed it.  the f2 console still works because that's the one you left in.

good luck,
dennis
Avatar of dmaroff

ASKER

My bad, I realize how the whole thing works now.  Munsie wasn't wrong.  But Id still like to know what a virtual console is.

Oh, and by reducing these mingettys will that prevent or set limits on other people from telnetting in or is that setup differently?  Another words, is this just strictly related to the ALT keys?

I thank you all for your help, Id like to give all of you points, cause you were all very helpfull, but I dont know how to do that.  Who wants the points?

Thanks, :)
-Dan
give them to munsie or to DVB .
 as i told you share knowledge is free
go take a look at www.gnu.org .without gnu linux is just a kernel !
reducing the mingettys just resrict the alt terminals.   You can still telnet in as many times as you want.

A virtual console is the term given to the splitting of the real console into multiple consoles (via the alt keypresses).  A virtual console is only available when you actually switch to it... when you're not switched to it, it only exists deep in the bowels of kernel space.

The console spends its time in linux showing one of the virtual consoles.

hope that helps,
dennis
Avatar of dmaroff

ASKER

Adjusted points from 50 to 75
Avatar of dmaroff

ASKER

I appreciate all your help everyone.  I agree with hotbot in that its nice to know you can get free help.  I gave it to Munsie because he helped me a lot.

Before I go, I know this has nothing to do with my original question, but if any of you know the answer, Id appreciate it.  When I close out of emacs (not Xemacs) using (C-x, C-c) I get to a prompt but above the prompt it says "Fatal error(11).segmentation fault"  It doesn't do anything to harm the system or get in my way, but it bothers me thats its there.  Has anyone dealt with this?  I tried re-installing emacs but that didn't help.  Im running version 20.3.1

Thanks again,
-Dan