1

I did a ssh to my server and started the yocto build on that server. Howeve, I lost my connection and now when I reconnect it I don't know how to see how my existing build is going on? I want to see the output being displayed on my terminal.

I can see that my process is running.

$ps aux | grep tx
tx    74480  0.0  0.0   6180  2176 pts/29   R+   11:06   0:00 grep tx

How do I reconnect back to see my build outputs? Please help me here. I am using debian machine.

ankur katiyar
  • 45
  • 2
  • 6
  • That is just the output of you running grep tx. The process of whatever you were doing with yocto has ceased to be. – Nasir Riley Dec 16 '21 at 03:11

1 Answers1

6

Short answer: you can't, that terminal is gone.

When you lost your connection, the system sent a signal to your shell telling the shell that your connection was gone. The shell in turn killed all of it's children processes, including the yocto build(s), and then exited. This is normal, expected, and correct behavior.

If you want to be able to reconnect to a given terminal / shell process when you get disconnected like that, you have to take some steps to be able to do so before you get disconnected. Two tools that can help with this are screen and tmux; they both do (approximately) the same thing in that they allow you to run long-lived commands inside them, then disconnect from the main session and reconnect to it later from another terminal or login session. What happens here is that when your connection gets terminated, the system sends the same signal as above to the screen or tmux process, but instead of passing that signal on to it's children, killing them all and cleaning itself up, it simply ignores that message and keeps it's children shell processes alive.

For details on how to use these programs, see their man pages.

John
  • 17,011