On 30/01/16 20:05, Stuart Downton wrote:
> I will look at sending the output to a log. One thing that would also
> be handy is writing the PIDs so if I needed to stop it I could script
> this reasonably easily. I think I have worked out the logic to grab
> the PID using pidof but if it could write it to the log that would be
> great. I will probably use the -M time for recording specific streams
> shows.

You could be evil and delay running 'ts' until the pid is known.
Something like (untested):

 tmpfifo=$(mktemp -d)/fifo
 mkfifo $tmpfifo
 fPls ... >(rotatelogs ...) 2>$tmpfifo &
 pid=$!
 ts "$pid %F %T" <$tmpfifo >/path/to/log &
 wait

Reply via email to