Ok nevermind I've compiled and updated tmux 1.9a from Debian 1.3-2 (
aptitude ) and two examples A and C work!
~Cheers
On 20 October 2014 00:33, Sebastian Tarach <sebastian.tar...@gmail.com>
wrote:
> Hello,
>
> I want to force tmux to log my server daemon output but can't get this to
> work :/ pipe-pane only works for me when I type it myself in tmux window
> after attaching it. I can't "send" the pipe-pane command to detached tmux
> instance to start its logging.
>
> Thanks in advance
>
> I have also put script from below here: http://pastebin.com/yPPxHHSN
>
> #!/bin/bash
> session="test"
> logfile="${HOME}/tmux-$(date +'%Y.%m.%d-%H.%m')-METHOD-"
>
> echo "LOG FILE: ${logfile}"
>
> #if [ -e $logfile ]; then
> # rm $logfile
> #fi
>
> tmux new-session -d -s $session
>
> function senddata {
> tmux send-keys -t ${session} "echo TEST ${1}.1" C-m
> tmux send -t ${session} "echo TEST ${1}.2" ENTER
> }
>
> # METHOD A
> tmux pipe-pane -o -t ${session} "cat > ${logfile}A.log"
> senddata A
>
> # METHOD B
> tmux send -t ${session} "tmux pipe-pane -o -t ${session} 'cat >
> ${logfile}B.log'" ENTER
> senddata B
>
> # METHOD C
> tmux send-keys -t ${session} "tmux pipe-pane -o -t ${session} 'cat >
> ${logfile}C.log'" C-m
> senddata C
>
> echo "LISTING LOGS"
> ls "${logfile}*"
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users