s6-tai64nlocal.html (2616B)
1 <html> 2 <head> 3 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <meta http-equiv="Content-Language" content="en" /> 6 <title>s6: the s6-tai64nlocal program</title> 7 <meta name="Description" content="s6: the s6-tai64nlocal program" /> 8 <meta name="Keywords" content="s6 command s6-tai64nlocal filter timestamp TAI64 TAI64N human-readable date time" /> 9 <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> 10 </head> 11 <body> 12 13 <p> 14 <a href="index.html">s6</a><br /> 15 <a href="//skarnet.org/software/">Software</a><br /> 16 <a href="//skarnet.org/">skarnet.org</a> 17 </p> 18 19 <h1> The s6-tai64nlocal program </h1> 20 21 <p> 22 s6-tai64nlocal acts as a filter, reading from stdin and writing to stdout. 23 For every line that begins with a 24 <a href="//skarnet.org/software/skalibs/libstddjb/tai.html#timestamp">TAI64N 25 timestamp</a>, it replaces this timestamp with a human-readable local date and 26 time. 27 </p> 28 29 <h2> Interface </h2> 30 31 <pre> 32 s6-tai64nlocal [ -g ] 33 </pre> 34 35 <ul> 36 <li> s6-tai64nlocal exits 0 when it sees the end of stdin. If there's an 37 unfinished line, s6-tai64nlocal processes it 38 and writes it before exiting. </li> 39 </ul> 40 41 <h2> Options </h2> 42 43 <ul> 44 <li> <tt>-g</tt> : print GMT time instead of local time. </li> 45 </ul> 46 47 <h2> Notes </h2> 48 49 <ul> 50 <li> The typical use case of s6-tai64nlocal is to read files that have 51 been filtered through <a href="s6-tai64n.html">s6-tai64n</a>, or log files 52 that have been produced by <a href="s6-log.html">s6-log</a> with the <tt>-t</tt> 53 option. For instance, to read the latest httpd logs with human-readable 54 timestamps, <tt>s6-tai64nlocal < /var/log/httpd/current | less</tt> is a 55 possible command. </li> 56 <li> s6-tai64nlocal does neither "line buffering" nor "block buffering". It does 57 <em>optimal buffering</em>, i.e. it flushes its output buffer every time 58 it risks blocking on input. </li> 59 </ul> 60 61 <h2> Troubleshooting </h2> 62 63 <p> 64 If s6-tai64nlocal does not appear to give the correct local time: 65 </p> 66 67 <ul> 68 <li> Check the compilation options that were used for the 69 <a href="//skarnet.org/software/skalibs/">skalibs</a> libraries 70 your s6-tai64nlocal program was linked against. In particular, check whether the 71 <tt>--enable-tai-clock</tt> or <tt>--enable-right-tz</tt> configure options 72 have been given. </li> 73 <li> Compare these flags and their meanings with your current timezone. In particular, 74 check <tt>/etc/localtime</tt>, <tt>/etc/timezone</tt>, <tt>/etc/TZ</tt>, and the TZ 75 environment variable. </li> 76 </ul> 77 78 </body> 79 </html>