×

INDI Library v1.9.5 Released (08 Mar 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Monitoring kstars - astromonitor

  • Posts: 20
  • Thank you received: 1
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
4 months 3 weeks ago #78802

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

  • Posts: 74
  • Thank you received: 10
Hi, how does this differ from Watchdog?
4 months 3 weeks ago #78835

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

  • Posts: 20
  • Thank you received: 1
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
4 months 3 weeks ago #78836

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

  • Posts: 74
  • Thank you received: 10
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.
4 months 3 weeks ago #78839

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

  • Posts: 20
  • Thank you received: 1
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
4 months 3 weeks ago #78843

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

Time to create page: 0.670 seconds