natxo
Posts: 29
Joined: Mon Sep 18, 2017 3:47 pm

agetty cpu ussage

Mon Nov 13, 2017 11:06 am

Hello

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

Image

User avatar
RaTTuS
Posts: 10498
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: agetty cpu ussage

Mon Nov 13, 2017 11:38 am

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 ?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

natxo
Posts: 29
Joined: Mon Sep 18, 2017 3:47 pm

Re: agetty cpu ussage

Mon Nov 13, 2017 11:55 am

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?

User avatar
PeterO
Posts: 5132
Joined: Sun Jul 22, 2012 4:14 pm

Re: agetty cpu ussage

Mon Nov 13, 2017 11:57 am

What does running the command below produce :

ps lax | grep getty

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
RaTTuS
Posts: 10498
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: agetty cpu ussage

Mon Nov 13, 2017 11:58 am

your running gestorTurnos as root and that is what is taking up all the cpu ...
see what PeterO said
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

natxo
Posts: 29
Joined: Mon Sep 18, 2017 3:47 pm

Re: agetty cpu ussage

Mon Nov 13, 2017 12:24 pm

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?

User avatar
RaTTuS
Posts: 10498
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: agetty cpu ussage

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
Last edited by RaTTuS on Mon Nov 13, 2017 12:33 pm, edited 1 time in total.
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
PeterO
Posts: 5132
Joined: Sun Jul 22, 2012 4:14 pm

Re: agetty cpu ussage

Mon Nov 13, 2017 12:30 pm

Try turning off the login on ttyAMA0 with raspi-config.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: agetty cpu ussage

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

User avatar
RaTTuS
Posts: 10498
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: agetty cpu ussage

Mon Nov 13, 2017 12:33 pm

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
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

natxo
Posts: 29
Joined: Mon Sep 18, 2017 3:47 pm

Re: agetty cpu ussage

Mon Nov 13, 2017 12:40 pm

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

natxo
Posts: 29
Joined: Mon Sep 18, 2017 3:47 pm

Re: agetty cpu ussage

Mon Nov 13, 2017 1:51 pm

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.

natxo
Posts: 29
Joined: Mon Sep 18, 2017 3:47 pm

Re: agetty cpu ussage

Mon Nov 13, 2017 1:59 pm

Also if i stop my app and run top i still see "agetty" eating my cpu

natxo
Posts: 29
Joined: Mon Sep 18, 2017 3:47 pm

Re: agetty cpu ussage [SOLVED]

Mon Nov 13, 2017 6:51 pm

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 !!!

User avatar
RaTTuS
Posts: 10498
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: agetty cpu ussage

Tue Nov 14, 2017 8:13 am

umm interesting ,
do you have anything plugged into the GPIO ports of the RPI ?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

natxo
Posts: 29
Joined: Mon Sep 18, 2017 3:47 pm

Re: agetty cpu ussage

Wed Nov 15, 2017 2:29 pm

Yep i have two i2c boards connected, not using serial at all

Return to “Beginners”