Timeline for How to view the output of a running process in another bash session?
Current License: CC BY-SA 4.0
23 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 13, 2021 at 19:45 | comment | added | WinEunuuchs2Unix |
@Gilles'SO-stopbeingevil' Thank you. I agree strace is probably a silly way of solving the problem. I've actually started down a new path of parsing ffplay output redirected to temp file.
|
|
| Mar 13, 2021 at 19:21 | comment | added | Gilles 'SO- stop being evil' |
@WinEunuuchs2Unix strace -p… … 2>&1 | head -n 1 will cause strace to exit when it can't write to the pipe anymore. I doubt that it would be useful to "get the current ffplay output" in this way, but there you are.
|
|
| Mar 13, 2021 at 16:55 | comment | added | WinEunuuchs2Unix |
To just get the current ffplay output, can strace be instructed to print one line and exit immediately? Currently it runs in a loop until <CTRL>+C is pressed. If relevant I will be calling strace from python and ffplay is also called from python but launched as a background task. Is a new question warranted in this case?
|
|
| Sep 6, 2019 at 10:13 | comment | added | Micros |
In case you're on a server which does not have strace by default, you can usually install it by running yum install strace.
|
|
| Jul 3, 2019 at 21:28 | comment | added | Jeff Ward |
Thanks for this! See how to parse the output of strace in my answer below.
|
|
| Jun 18, 2019 at 16:03 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 4.0 |
mention the need for running strace as root, as noted by Saber
|
| Jun 18, 2019 at 15:06 | comment | added | Saber | worked for me with sudo | |
| Oct 30, 2018 at 20:41 | comment | added | Daniel Serodio | @User explainshell.com allows you to paste a command and it'll explain the arguments, e.g. explainshell.com/explain?cmd=strace+-p1234+-s9999+-e+write | |
| Sep 19, 2018 at 16:23 | comment | added | Syco | I hope I'm not saying something stupid, but to only get stdout you can use: strace -p1234 -s9999 -e write 2>&1|grep '^write(1' | |
| Apr 13, 2017 at 12:36 | history | edited | CommunityBot |
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
|
|
| Aug 25, 2016 at 23:53 | comment | added | Adam Fowler | I came here looking for STDout and got a treasure trove of valuable debug data. Thanks! | |
| Dec 22, 2015 at 12:25 | comment | added | Rafael Moni | @Gilles well, damn. I didn't build the application. So, I guess I'll have to 'dissect' the application. | |
| Dec 22, 2015 at 12:12 | comment | added | Gilles 'SO- stop being evil' | @RafaelMoni A program to do what you're asking is called a debugger. | |
| Dec 22, 2015 at 11:39 | comment | added | Rafael Moni | I have a php process running a websocket and some variables inside, but I can't stop it right now to 'echo/print_r'. Is there a way to capture those variables 'on the fly'? | |
| Dec 2, 2015 at 16:03 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |
added 384 characters in body
|
| S Dec 2, 2015 at 15:57 | history | edited | dhag | CC BY-SA 3.0 |
Added and fixed strace explanation from suggested edit.
|
| Dec 2, 2015 at 15:50 | review | Suggested edits | |||
| S Dec 2, 2015 at 15:57 | |||||
| Sep 1, 2015 at 15:32 | comment | added | Pistos |
"Can you explain all the arguments?" @User: man strace
|
|
| Jul 16, 2015 at 17:46 | comment | added | Gilles 'SO- stop being evil' | @ThorSummoner If you see a backslash followed by three octal digits between double quotes in the strace output, that means a byte whose numeric value is given by the digits. You'll see that for non-ASCII characters. | |
| Jul 16, 2015 at 17:27 | comment | added | ThorSummoner | There was a lot of backslashes and numbers in a lot of the output I was getting from nodejs; Any leads on what encoding they might be in? There was plenty of plain text too, which was all i needed. | |
| Mar 16, 2015 at 22:15 | comment | added | User | Can you explain all the arguments? | |
| Mar 28, 2013 at 0:33 | comment | added | Jonah | I don't suppose there's a way to narrow down the output to just the standard output? | |
| Dec 16, 2012 at 0:23 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |