OutsideIT / FireMotD

:fire: Fire Framework Linux MoTD Generator :fire:
https://outsideit.net/firemotd
GNU General Public License v3.0
174 stars 44 forks source link

FireMotD takes very long to render system info #158

Open Profoktor opened 6 months ago

Profoktor commented 6 months ago

Issue Type

Bug report / Enhancement Request

Issue Detail

Expected Behavior

FireMotD does not take longer as that the user is annoyed when logging in to the shell

Actual Behavior

Due to various jq- commands (+ file copy), gathering info + printing the info screen takes > 5s

How to reproduce Behavior

Profoktor commented 6 months ago

@willemdh : Are you still open for a PR? I would refactor the code s.th. the usage of jq is minimized (to some extend)

willemdh commented 6 months ago

Well I dont have much time to invest in this anymore, due to other priorities, but I'm ok with accepting a pr to improvements performance if you can confirm it works on Red Hat and Ubuntu.

Profoktor commented 6 months ago

Open a PR: #159 However, so far I was only able to test it on Debian / openHABian I have a Ubuntu system at hand and can check there as well, RHEL is out of bound for me though

willemdh commented 6 months ago

Centos or some other rpm based package should also work. Tx anyway. I'll accept the pr soon. Checked the changes, should be ok.

ThomDietrich commented 6 months ago

@Profoktor looks like a great addition! In openHABian we implemented special steps to optimally include FireMotD. Did you check whether any of these need changing?

https://github.com/search?q=repo%3Aopenhab%2Fopenhabian+firemotd&type=code

CC @mstormi Cheers!

Profoktor commented 6 months ago

@ThomDietrich - I originally stumbled across https://github.com/openhab/openhabian/blob/8bd54fed98511ec85b2dba4a6b08630a8205bbb9/includes/generic/bash_profile#L30 in #157 and hoped I could remedy this. However, FireMotD still takes 3 seconds on a RPi 3, which is quite annoying during login, so I don't think we should change that part. It would require a major rewrite of FireMotD to further optimize file access

Besides that, I did not change any APIs, so no (mandatory) changes required

willemdh commented 6 months ago

Yea sry this was a little hobby project I did when I had more time. I've been tinkering to restart from scratch with the help of Chatgpt. But I have too many other things on my mind atm. I've also been thinking to retire the whole thing tbh..

willemdh commented 6 months ago

Updated the readme. Please clone / fork whatever you need. I'm shutting this down. Thanks for understanding priorities can shift in life.

Profoktor commented 6 months ago

Hi @willemdh, I can totally relate to that.

However, since some projects / people may be using FireMotD - might you consider to just add the status-notice to the "old" readme, so that the info on how to use FireMotD stays visible?

And I suppose by "shutting down" you mean "setting to read only", or are you planning on deleting the repo in 01.01.2024?

willemdh commented 6 months ago

I'm thinking of deleting the whole OutsideIt thing, incl firemotd and the nagios plugins. Also got a domain name left for that which I will also stop. Probably not the first of January, but somewhere in Q1 2024.

ThomDietrich commented 6 months ago

In case no one shows a strong will to take over the project (which would be the best outcome) I suggest to move the repository over into https://github.com/rejuvenate/rejuvenate