Operating System - HP-UX
1758607 Members
2213 Online
108873 Solutions
New Discussion юеВ

Re: What is the purpose of the getty daemon?

 
SOLVED
Go to solution

What is the purpose of the getty daemon?

Last couple of days, the application I support experienced an issue where our box went from degraded service to a full outage - where we could ping our HPUX box but no other access, could not connect to the web client or telnet to the unix server, system completely hung, 100% memory usage.

The first day this occurred, hardware support simply initialized the getty from the /etc/inittab which corrected the issue.

The second day this occurred, hardware support rebooted the machine.

Can somebody please help me understand the purpose of the getty daemon?

...the application I support utilizes Rightsite, which I undertand is a resource memory hog. Though I don't understand the purpose of this getty service, I do realize that "simply" rebooting the maching killed the Rightsite instances and ultimately freed the memory usage, solving our problem.




3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: What is the purpose of the getty daemon?

getty is supposed to accept terminal sessions.

My console has a getty session associated with it.

/usr/sbin/getty

I also see it when I program a modem to pick up a call and provide terminal services(login).

Note that telnet and secure shell do not use a getty daemon/session.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: What is the purpose of the getty daemon?

In the misty dawn of UNIX, getty was part of the chain (init, getty, login, shell) used to gain access to the system. In those days, the typical system had many serial ports that were either hard-wire connected to terminals or modems. Each of these ports would have an inittab entry that would spawn a getty. Nowadays, typically the only getty running is that of a serial console and other connections are made using the telnet daemon (telnetd) or similar mechanisms.

Man getty, inittab for details.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor
Solution

Re: What is the purpose of the getty daemon?

Unix (and HP-UX) does not communicate with people...you need some sort of program to act as a go-between. A real terminal such as the console has no connection to the kernel and is useless until some program opens the terminal device file (the serial port), sets the baud rate and other communication parameters, then looks for some character typed on the keyboard. The program that does this is getty (get tty where tty is the abbreviation of teletypewriter, the original Unix console).

Once a key is typed, the getty program looks in /etc/gettydefs to see what to do, and normally will start the login program. Login asks for user name and password, and when correct, a shell is started. getty waits in the background until the user logs out and then is restarted by inittab.

getty is ONLY used for serial ports, the console and if you have additional serial ports like modems, will be started for them. getty doesn't consume any resources (it's very small) and likely had nothing to do with the problems you are seeing. Make sure that there are no error messages like "getty respawning too rapidly" Fix these in inittab by turning off unnecessary services that use getty.

You need to look at both the console as well as /var/adm/syslog/syslog.log for problems. 500% of memory can be used with no problems if you have enough swap space, so there is more troubleshooting required. It sounds like you have a lot of stuff running on the box (web server, Rightside, etc) so you'll need to monitor the system. Start with top and sar, but HP's Glance product is the best.


Bill Hassell, sysadmin