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