Enter your search

Fix mingetty high CPU usage

By

Develop with Geoff at GoSquared

If like us you’ve been noticing decreased SSH terminal responsiveness on your server recently, or high CPU usage by a process called “mingetty”, you’ll want to know why this process is eating up your valuable CPU time and stop it doing so!

The Problem

For those of you who don’t know, mingetty is, as the manual page puts it, “a minimal getty for use on virtual consoles” – it is the process that handles the activity of your virtual console (like PuTTY). If mingetty’s CPU usage is high, and/or your console responds slowly (particularly while running certain programs like top), a likely reason is that your utmp log file is getting large, and thus opening and writing to this file becomes resource intensive.

The Solution

Simply delete/move your current utmp log and create a fresh empty one. We moved ours:
mv /var/run/utmp /var/run/utmp.BAK
touch /var/run/utmp

That’s it! Let’s see if this has solved the issue…

Hooray, it worked! Our CPU usage has now evened out to an acceptable level. You can check the CPU usage of mingetty by typing “top” into your console.

The utmp log contains information on all logins to your console, so you may need to repeat this step every now and again to prevent this happening again. Although you should keep tabs on who is logging into your system at all times, you could also just remove the /var/run/utmp logfile completely so you don’t need to keep repeating this method.

You May Also Like

Group 5 Created with Sketch. Group 11 Created with Sketch. CLOSE ICON Created with Sketch. icon-microphone Group 9 Created with Sketch. CLOSE ICON Created with Sketch. SEARCH ICON Created with Sketch. Group 4 Created with Sketch. Path Created with Sketch. Group 5 Created with Sketch.