Fix mingetty high CPU usage
Geoff Wagstaff / December 6, 2009

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.





james said,
December 9, 2009 at 02:59 ()
Nice post.
Btw, Those social media buttons are amazing.
James said,
December 10, 2009 at 03:57 ()
Hi James, glad you like it, and thanks - we might think about releasing some similar icons for download on Liquidicity soon.
James said,
December 10, 2009 at 18:34 ()
That would make my day and prolly a few there after.
Hrm, the James & Jimmy show. Take it on tour?
./configure --with-geek_and_bad_humor && make && make install
Someone said,
October 9, 2010 at 17:38 ()
Glad I found this. The high CPU load was driving me nuts and I thought my server had been compromised.