eth-cscs / firecrest

BSD 3-Clause "New" or "Revised" License
32 stars 8 forks source link

Feature request: tail starting with bytes/lines #189

Closed henrique closed 6 months ago

henrique commented 1 year ago

Hi guys,

I'd like to use the reverse behaviour for tail, i.e. read from a seek position instead of reading the last bytes/lines.

https://man7.org/linux/man-pages/man1/tail.1.html From the man-page, you can add an additional '+' to either -c or -n to reverse the behaviour.

Perhaps a starting_with_mode=True parameter?

This would be very useful when trying to follow the progress of a job's output, without having to call stat beforehand. Thanks heaps! Cheers, Henrique

henrique commented 1 year ago

Hey guys, Any update on this? :grimacing: This seems to be the only reliable way to follow logs as they happen. Unless you have another idea? thanks!

ekouts commented 1 year ago

Hi @henrique ! Sorry for not updating the issue, but this should be fixed in the latest release (https://github.com/eth-cscs/firecrest/releases/tag/v1.13.1) and it's already deployed. The tail has a new boolean query parameter, skip_beginning. Could you please give it a try and let us know if this works fine for you?

ekouts commented 6 months ago

Hi @henrique, I will close this ticket, but let us know if you have any problem using the endpoint. Cheers, Eirini