开发者

Log screen session to a file other then screenlog.0

开发者 https://www.devze.com 2023-03-31 01:35 出处:网络
I have multipal screen sessions that are started like this... /usr/bin/screen -A -m -d -S tower /usr/local/bin/vmpsd -a 10.0.1.214 -d -f /usr/local/vmpsdb/tower.db

I have multipal screen sessions that are started like this...

/usr/bin/screen -A -m -d -S tower /usr/local/bin/vmpsd -a 10.0.1.214 -d -f /usr/local/vmpsdb/tower.db

I would like to log this screen session to /var/log/tower.log

Any ideas on how I can do this.. I have tried using tee, but开发者_如何学JAVA that did not work.


Try this :

screen -dmS <sock_name>                         #Start detached screen session<br>
screen -S <sock_name> -X logfile <logfile_name> #Use logfile command to set logging file<br>
screen -S <sock_name> -X log                    #Use log command to start logging<br>


Use script command inside screen session.

0

精彩评论

暂无评论...
验证码 换一张
取 消