Page 1 of 1

agetty cpu ussage

Posted: Mon Nov 13, 2017 11:06 am
by natxo
Hello

What its "agetty" and why its eating my cpu?

Image

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 11:38 am
by RaTTuS
it's an alternative getty
which is a get tty bascially how you log in ,
as that one is running as root a couple of questions
have you opened your pi up to access from the internet and do you have the default username / password still in place?
what are you running on your pi ?

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 11:55 am
by natxo
Thanks

No im running my pi on a private network, and i changed my password.

My pi its running a custom app called "gestorTurnos", i was checking how much memory my app use and saw that. i have a PSU board connected and another i2c device. And im running my app from desktop if that matters

Its anything i can check?

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 11:57 am
by PeterO
What does running the command below produce :

ps lax | grep getty

PeterO

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 11:58 am
by RaTTuS
your running gestorTurnos as root and that is what is taking up all the cpu ...
see what PeterO said

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 12:24 pm
by natxo
PeterO wrote:
Mon Nov 13, 2017 11:57 am
What does running the command below produce :

ps lax | grep getty

PeterO
Attached an screenshot
Image


RaTTuS wrote: your running gestorTurnos as root and that is what is taking up all the cpu ...
see what PeterO said
Yes, thats because im sending a hearbeat from y app to the rpi watchdog and if not root i can not write to /dev/watchdog

Im doing that wrong?

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 12:27 pm
by RaTTuS
1) post your code
2) install pastebinit
i.e.
sudo apt-get update && sudo apt-get install pastebinit
then sue that to post text - don't do screenshots - they are hard to read....
like
ps axOT | pastebinit

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 12:30 pm
by PeterO
Try turning off the login on ttyAMA0 with raspi-config.

PeterO

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 12:31 pm
by KLL
RaTTuS wrote:
Mon Nov 13, 2017 12:27 pm
sudo apt-get update && sudp apt-get install pastebinit

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 12:33 pm
by RaTTuS
KLL wrote:
Mon Nov 13, 2017 12:31 pm
RaTTuS wrote:
Mon Nov 13, 2017 12:27 pm
sudo apt-get update && sudp apt-get install pastebinit
and fixed ;-p

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 12:40 pm
by natxo
RaTTuS wrote:
Mon Nov 13, 2017 12:27 pm
1) post your code
2) install pastebinit
i.e.
sudo apt-get update && sudo apt-get install pastebinit
then sue that to post text - don't do screenshots - they are hard to read....
like
ps axOT | pastebinit
What code are do you refer, the class i made for watchdog its
https://gist.github.com/natxopedreira/6 ... 43c6cd4b99

And the pastebinit result of ps lax | grep getty
http://paste.debian.net/995444

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 1:51 pm
by natxo
PeterO wrote:
Mon Nov 13, 2017 12:30 pm
Try turning off the login on ttyAMA0 with raspi-config.

PeterO
I run raspi-config and said no to:
+ would you like a login shell to be accesible over serial?
+ would you like the serial hardware port to be enabled?

reboot, try again and still agetty its eating my cpu.

Re: agetty cpu ussage

Posted: Mon Nov 13, 2017 1:59 pm
by natxo
Also if i stop my app and run top i still see "agetty" eating my cpu

Re: agetty cpu ussage [SOLVED]

Posted: Mon Nov 13, 2017 6:51 pm
by natxo
Hello

Previously i disable the console on ttyAMA0 with raps-config... and get the same result.

But.... i was able to get rid of this agetty high cpu with this :D :D

Code: Select all

sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service
Thanks to all for your help, community its great !!!

Re: agetty cpu ussage

Posted: Tue Nov 14, 2017 8:13 am
by RaTTuS
umm interesting ,
do you have anything plugged into the GPIO ports of the RPI ?

Re: agetty cpu ussage

Posted: Wed Nov 15, 2017 2:29 pm
by natxo
Yep i have two i2c boards connected, not using serial at all