I have an instance of Ubuntu 12.04 LTS (GNU/Linux 3.2.0-25-virtual i686) running as a KVM-VM on a host-machine that runs one more VM beside it.

I deploy a Ruby on Rails application using the Capistrano deployment-gem.

However, if I deploy twice in a row in a short time, the CPU usage jumps to 100% because of the /sbin/getty process.

How can this be?

I believe getty is a rather simple program that passes a login-name from a terminal to a login-process.

Also: In my Capfile (Capistrano configuration file) I am running certain commands after the Rails application is deployed including a call to sudo /sbin/restart <APPNAME> which is an upstart task.

Could this be related somehow?

I can always kill the getty process and the problem is gone until the next deployment, but I would rather understand and fix the problem.

Any help is appreciated. Attached is a screenshot of my problem.

/sbin/getty causes 100% CPU load

  • 2
    You can trace what the getty is doing with 'strace -f -p 18081' where 18081 is the pid of the misbehaving getty. If strace doesn't show anything, its likely a bug in getty. – SpamapS Aug 18 '12 at 14:09
  • Were you able to solve this issue permanently? – Christoph Geschwind Feb 6 '14 at 17:31

Finally I also encountered this issue on a Ubuntu 12.10 Server VPS.

But as I don't need any tty (because I'm connecting by ssh) I fixed it the hard way:

sudo rm /etc/init/tty*
sudo reboot

And it works pretty well! no more getty process stuck.


Are you logging to syslog?

Is your syslog going to tty1?

If so, there's a good chance you have more than 38400bps worth of syslog and getty is blocking while it waits to dump data into its tty.

I'd check your rsyslog configuration - by default, Ubuntu logs some syslog output to /dev/xconsole via /etc/rsyslogd.d/50-default.conf.

  • If this is the case, how to prevent it? – knownasilya Sep 22 '15 at 14:20

On one of my core I was getting 100% CPU utilization for agetty process on my Ubuntu 16.04 machine. In my particular case I only used ssh connection for accessing server, therefore after investigating for a while I decided to remove it.

sudo rm /etc/systemd/system/getty.target.wants/getty@tty1.service
sudo rm /lib/systemd/system/getty@.service

Reboot is required. Solution was found at https://peteris.rocks/blog/can-you-kill-it/ . Before taking such option, be careful to check if you really do not need tty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.