×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Monitoring kstars - astromonitor

  • Posts: 152
  • Thank you received: 107
Hi people!

I had some free time lately and I decided to start a small side project to solve one of the issue I face sometimes when using kstars, crashing.

To be clear, I don't recall having any crash on my PC (arch) but I get a lot of them on my raspberry pi and most of the time they seem to be random, this has caused me some issues in the past, the most dangerous IMO:
 - scope hitting the tripod cause the mount continue tracking after
 - sessions interrupted in half

So to the point, what I am providing?

Not much at the moment, for now I am just monitoring kstars every 15s and notify people via telegram if the process stops.

I have some other ideas for the next year like expanding to different notifications type (email, sms), restarting indi and do some recovery actions (parking) and other things that may be needed, but in the meanwhile, if you want to be notified if kstars crashes on your Linux/MacOS/raspberry you can try it :)

You can find the project here github.com/MattBlack85/astro_monitor should you have any issue installing please reach out

It is compiled so you don't need to install any dependency, the oneliner for installing works on my linux64 box and on my raspberry 32bit, haven't tried on aarch64 and MacOS!

Should you have any issue or ideas, please open an issue on github and I'll have a look!

Best,
Mattia
2 years 3 months ago #78802

Please Log in or Create an account to join the conversation.

  • Posts: 597
  • Thank you received: 280
Hi, how does this differ from Watchdog?
2 years 3 months ago #78835

Please Log in or Create an account to join the conversation.

  • Posts: 152
  • Thank you received: 107
Hi John! If you are thinking of a kernel watchdog, this, in this state is somewhat similar, but with the exception that restarting a service, for kstars, specifically, cannot fully recover from a crash.

My idea is to add a bunch of custom logic to this program with time so it will eventually fit everybody's need, and eventually, one day, being able to restore a sessione to a pre-crash state
2 years 3 months ago #78836

Please Log in or Create an account to join the conversation.

  • Posts: 597
  • Thank you received: 280
Hi Mattia, I was referring to the Ekos Watchdog process...
www.indilib.org/aux/watchdog.html

It basically handles a shutdown if it loses its heartbeat and can execute a custom script. I think its aimed mainly at performing a clean shutdown in the event of a crash.

In my opinion what what be quite useful would be a script to restart Kstars / Ekos loading the sequence that was executing at the point of failure. The sequence is already smart enough to figure out where it got to and pick up from there. Probably needs some basic logic like try x times then just shutdown and would need to be careful about restarting when constraints have been violated (although the scheduler may handle this already). There may also be things to worry about concerning restarts around things like Meridian Flips.
2 years 3 months ago #78839

Please Log in or Create an account to join the conversation.

  • Posts: 152
  • Thank you received: 107
That is neat! I wasn't aware og such thing. I think by default the watchdog covers what I'd like to implement.

My solution tho, wants to be something that works if any if kstars/indi goes down and as you said, I'd like to have some smart introspection to be able to restart the session from where it left. I think having a dedicated program instead of a bunch of scripts may help with a couple of things
2 years 3 months ago #78843

Please Log in or Create an account to join the conversation.

Time to create page: 0.473 seconds