openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
820 stars 251 forks source link

FireMotD failing (login delay) #1653

Closed mstormi closed 2 years ago

mstormi commented 2 years ago

Logging into my test box w/ a fresh image installed takes several seconds, that ain't normal. Not analyzed for now, this is a generic reminder.

Not sure if the reason could be within my local network but I don't think so in the first place. IP is obtained from DHCP with a fixed mapping MAC->IP on the DHCP server/router and the test box is always the same (ie MAC does not change).

ecdye commented 2 years ago

Perhaps the cpu is just running startup tasks after the fresh install?

blockbasti commented 2 years ago

I have noticed this for a while now. Logging in via SSH takes 5 to 10 seconds. Switching from FireMOTD to neofetch helps somewhat but it still takes a lot longer to log in and get a shell than on other devices.

mstormi commented 2 years ago

It's FireMotd when generating the login page, That should be fast once the FireMotd database is generated which happens offline daily but is not. Running FireMotD --theme Gray -v on CLI is very slow. See it's gathering the info rather than to use the cache. I could not get it to use that so far.

mstormi commented 2 years ago

Reading https://www.outsideit.net/home I think it's about time to stop using FireMotD. For now I've commented it out in bash_profile for new installs.

mstormi commented 2 years ago

Added our own cache, seems to work for now https://github.com/openhab/openhabian/commit/d1cce9c3f7d826e9843fa88695f0063cf6893273