linux - See stdout of python script running through rc.local -


inorder run python script @ ubuntu startup, wrote command in rc.local file as

/usr/bin/python path/to/my/script.py exit 0 

my script.py has print statements. wanted know can see them while script being executed @ background. tried putting

exec 2> /tmp/rc.local.log exec 1>&2 set -x 

at top, din't show in rc.local.log except sequence in bash commands got executed.

i tried writing in rc.local /usr/bin/python path/to/my/script.py > /some/log.txt & din't work out either.

so how see print statements of python script running in background via rc.local?


Comments

Popular posts from this blog

c++ - CPP, 'X' button listener -

shared memory - gstreamer shmsrc and shmsink with h264 data -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -