S6-TAI64NLOCAL(8)

πŸ“¦ version 2.15.1.0, in nixpkgs unstable

πŸ’… s6-tai64nlocal(8) β€” the glow-up your timestamps deserve

okay so bestie, welcome to s6-tai64nlocal, part of the System Manager's Manual lineup. she's a little filter that lives on your stdin and stdout and makes ugly TAI64N timestamps look human. πŸ’–


✨ NAME ✨

<hotpink>s6-tai64nlocal</hotpink> β€” read from stdin and write to stdout, replacing every line beginning with a TAI64N timestamp[1] with a human-readable local date and time. that's it, that's the whole job, and she ate. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

s6-tai64nlocal [-g]

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, s6-tai64nlocal exits 0 when it sees the end of stdin. periodt. and if there's an unfinished line hanging around when that happens, she still processes it and writes it out before exiting β€” no line left behind, we don't do that here. 🫢

her typical use case? reading files that have been filtered through s6-tai64n(8), or log files produced by s6-log(8) with the -t option. for instance, if you wanna read the latest httpd logs with human-readable timestamps, this is a totally valid move:

s6-tai64nlocal < /var/log/httpd/current | less

ok and now the buffering saga, because people always ask: s6-tai64nlocal does neither "line buffering" nor "block buffering". she does optimal buffering, i.e. she flushes her output buffer every single time she risks blocking on input. highkey the best of both worlds, no notes. ✨


🌸 if the local time looks wrong… 🌸

if s6-tai64nlocal does not appear to give the correct local time, do this vibe check:

  • check the compilation options that were used for the skalibs[2] libraries your s6-tai64nlocal program was linked against. in particular, check whether the --enable-tai-clock or --enable-right-tz configure options have been given. πŸ‘€
  • compare these flags and their meanings with your current timezone. in particular, check /etc/localtime, /etc/timezone, /etc/TZ, and the TZ environment variable. like, actually check them, don't just assume. 😭

πŸ’… OPTIONS πŸ’…

  • -g β€” print GMT time instead of local time. simple as that, bestie. 🌍

πŸ”₯ SEE ALSO πŸ”₯

<cyan>s6-applyuidgid(8)</cyan>, <cyan>s6-envdir(8)</cyan>, <cyan>s6-envuidgid(8)</cyan>, <cyan>s6-fghack(8)</cyan>, <cyan>s6-setsid(8)</cyan>, <cyan>s6-setuidgid(8)</cyan>, <cyan>s6-softlimit(8)</cyan>, <cyan>s6-tai64n(8)</cyan>

[1] https://skarnet.org/software/skalibs/libstddjb/tai.html#timestamp

[2] https://skarnet.org/software/skalibs/

this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-tai64nlocal.html


πŸ‘‘ AUTHORS πŸ‘‘

  • Laurent Bercot
  • Alexis <flexibeast@gmail.com> (man page port)

ok that's the whole page, go forth and make your logs readable. slay πŸ¦‹πŸ’œ

this one's shipped under the Debian banner, dated September 29, 2021 β€” and it's an S6-TAI64NLOCAL(8) situation all the way down. mwah. πŸ’‹

πŸ“¦ where this page comes from