Cannot see log content with tail but when terminating process i can see content with less
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
Im basically running:
nohup ./executable &> /tmp/out.log &
and to make sure the process is running i want to do
tail -f /tmp/out.log
but the only thing i get from tail is "nohup: ignoring input" and once killing the process previously started i can see the contents of out.log
linux io-redirection tail nohup
New contributor
add a comment |Â
up vote
1
down vote
favorite
Im basically running:
nohup ./executable &> /tmp/out.log &
and to make sure the process is running i want to do
tail -f /tmp/out.log
but the only thing i get from tail is "nohup: ignoring input" and once killing the process previously started i can see the contents of out.log
linux io-redirection tail nohup
New contributor
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Im basically running:
nohup ./executable &> /tmp/out.log &
and to make sure the process is running i want to do
tail -f /tmp/out.log
but the only thing i get from tail is "nohup: ignoring input" and once killing the process previously started i can see the contents of out.log
linux io-redirection tail nohup
New contributor
Im basically running:
nohup ./executable &> /tmp/out.log &
and to make sure the process is running i want to do
tail -f /tmp/out.log
but the only thing i get from tail is "nohup: ignoring input" and once killing the process previously started i can see the contents of out.log
linux io-redirection tail nohup
linux io-redirection tail nohup
New contributor
New contributor
edited 49 mins ago
Rui F Ribeiro
36.5k1271116
36.5k1271116
New contributor
asked 53 mins ago
9uzman7
83
83
New contributor
New contributor
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
Run your program as:
nohup stdbuf -oL ./executable &> /tmp/out.log &
stdbuf can change the default buffering.
this made the trick! THANKS!
â 9uzman7
25 mins ago
add a comment |Â
up vote
1
down vote
Your executable is using buffered output, so you will only see something with tail
if more than one block of output is produced. The size of such a block will be 4k or more.
If you wrote the executable yourself, change the output to line buffered or to not buffered.
+1 Or add an instruction to flush stdout ; nonetheless we cannot give a better answer to such a vague question.
â Rui F Ribeiro
40 mins ago
makes sense, the executable is from the LoRa device provider. Is there an easy workaround? thanks for the response!
â 9uzman7
38 mins ago
You can allocate a pty and give that to the executable. Most programs use line buffered for a tty. Your program also does if you see immediate output if you run it directly from the shell.
â RalfFriedl
34 mins ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Run your program as:
nohup stdbuf -oL ./executable &> /tmp/out.log &
stdbuf can change the default buffering.
this made the trick! THANKS!
â 9uzman7
25 mins ago
add a comment |Â
up vote
3
down vote
accepted
Run your program as:
nohup stdbuf -oL ./executable &> /tmp/out.log &
stdbuf can change the default buffering.
this made the trick! THANKS!
â 9uzman7
25 mins ago
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Run your program as:
nohup stdbuf -oL ./executable &> /tmp/out.log &
stdbuf can change the default buffering.
Run your program as:
nohup stdbuf -oL ./executable &> /tmp/out.log &
stdbuf can change the default buffering.
answered 28 mins ago
Ipor Sircer
9,1501920
9,1501920
this made the trick! THANKS!
â 9uzman7
25 mins ago
add a comment |Â
this made the trick! THANKS!
â 9uzman7
25 mins ago
this made the trick! THANKS!
â 9uzman7
25 mins ago
this made the trick! THANKS!
â 9uzman7
25 mins ago
add a comment |Â
up vote
1
down vote
Your executable is using buffered output, so you will only see something with tail
if more than one block of output is produced. The size of such a block will be 4k or more.
If you wrote the executable yourself, change the output to line buffered or to not buffered.
+1 Or add an instruction to flush stdout ; nonetheless we cannot give a better answer to such a vague question.
â Rui F Ribeiro
40 mins ago
makes sense, the executable is from the LoRa device provider. Is there an easy workaround? thanks for the response!
â 9uzman7
38 mins ago
You can allocate a pty and give that to the executable. Most programs use line buffered for a tty. Your program also does if you see immediate output if you run it directly from the shell.
â RalfFriedl
34 mins ago
add a comment |Â
up vote
1
down vote
Your executable is using buffered output, so you will only see something with tail
if more than one block of output is produced. The size of such a block will be 4k or more.
If you wrote the executable yourself, change the output to line buffered or to not buffered.
+1 Or add an instruction to flush stdout ; nonetheless we cannot give a better answer to such a vague question.
â Rui F Ribeiro
40 mins ago
makes sense, the executable is from the LoRa device provider. Is there an easy workaround? thanks for the response!
â 9uzman7
38 mins ago
You can allocate a pty and give that to the executable. Most programs use line buffered for a tty. Your program also does if you see immediate output if you run it directly from the shell.
â RalfFriedl
34 mins ago
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Your executable is using buffered output, so you will only see something with tail
if more than one block of output is produced. The size of such a block will be 4k or more.
If you wrote the executable yourself, change the output to line buffered or to not buffered.
Your executable is using buffered output, so you will only see something with tail
if more than one block of output is produced. The size of such a block will be 4k or more.
If you wrote the executable yourself, change the output to line buffered or to not buffered.
answered 42 mins ago
RalfFriedl
3,5201522
3,5201522
+1 Or add an instruction to flush stdout ; nonetheless we cannot give a better answer to such a vague question.
â Rui F Ribeiro
40 mins ago
makes sense, the executable is from the LoRa device provider. Is there an easy workaround? thanks for the response!
â 9uzman7
38 mins ago
You can allocate a pty and give that to the executable. Most programs use line buffered for a tty. Your program also does if you see immediate output if you run it directly from the shell.
â RalfFriedl
34 mins ago
add a comment |Â
+1 Or add an instruction to flush stdout ; nonetheless we cannot give a better answer to such a vague question.
â Rui F Ribeiro
40 mins ago
makes sense, the executable is from the LoRa device provider. Is there an easy workaround? thanks for the response!
â 9uzman7
38 mins ago
You can allocate a pty and give that to the executable. Most programs use line buffered for a tty. Your program also does if you see immediate output if you run it directly from the shell.
â RalfFriedl
34 mins ago
+1 Or add an instruction to flush stdout ; nonetheless we cannot give a better answer to such a vague question.
â Rui F Ribeiro
40 mins ago
+1 Or add an instruction to flush stdout ; nonetheless we cannot give a better answer to such a vague question.
â Rui F Ribeiro
40 mins ago
makes sense, the executable is from the LoRa device provider. Is there an easy workaround? thanks for the response!
â 9uzman7
38 mins ago
makes sense, the executable is from the LoRa device provider. Is there an easy workaround? thanks for the response!
â 9uzman7
38 mins ago
You can allocate a pty and give that to the executable. Most programs use line buffered for a tty. Your program also does if you see immediate output if you run it directly from the shell.
â RalfFriedl
34 mins ago
You can allocate a pty and give that to the executable. Most programs use line buffered for a tty. Your program also does if you see immediate output if you run it directly from the shell.
â RalfFriedl
34 mins ago
add a comment |Â
9uzman7 is a new contributor. Be nice, and check out our Code of Conduct.
9uzman7 is a new contributor. Be nice, and check out our Code of Conduct.
9uzman7 is a new contributor. Be nice, and check out our Code of Conduct.
9uzman7 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f469299%2fcannot-see-log-content-with-tail-but-when-terminating-process-i-can-see-content%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password