robur-coop / albatross

Albatross: orchestrate and manage MirageOS unikernels with Solo5
ISC License
142 stars 17 forks source link

Record start time and report it in `albatross-client info` #168

Closed reynir closed 7 months ago

reynir commented 7 months ago

This issue can arguably be solved by setting up proper monitoring.

With the option --restart-on-fail unikernels are restarted when they exit for example if they run out of memory. If you monitor closely the console output (albatross-client console my-unikernel) or if you have proper monitoring setup you can figure out when this happens. Otherwise this information is easily lost. It would be nice to have reported in albatross-client info the start time of the unikernel or how long it's been running.

reynir commented 7 months ago

Alternatively this information could be gathered using process info of the running solo5 tender.

hannesm commented 7 months ago

I agree that both "started at" and "restarted for N times" would be useful statistics and information in the info output.

The former is already present in the stats daemon (kinfo_mem.start -- afaict only available on FreeBSD) --> but I'm all up for taking a timestamp of when the process creation was done.