Running picocom in the background without open session

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I would like picocom to log serial data on a remote computer, without having to keep my ssh session to the remote computer alive.



I have tried:




picocom <my options>


This dies when I logout.




picocom <my options> & 


No output on terminal, and exiting picocom with C-a C-x leaves the job as stopped, it doesn't kill it (I need to kill -9, a simple kill on the job does not work. I then have to manually clean the tty lock in /var/lock/).




picocom <my options> > tmp/data.log&


then in another ssh session:



tail -f tmp/data.log


No data cames out in the file data.log.




bash -c "picocom --baud 115200 /dev/ttyACM1 > /home/pi/tmp/data.log" &


No output to the file either. The job becomes "Stopped" right away.




nohup sh -c "picocom --baud 115200 /dev/ttyACM1 > /home/pi/tmp/data.log" &


I get the start output of picocom in the tailed file, but then the job is exited.




Good to know as well: picocom does not react to C-z.



My questions are:



  • is it at all possible to run picocom in the background?

  • what alternatives are there to log serial terminal without an open session?






share|improve this question
























    up vote
    1
    down vote

    favorite












    I would like picocom to log serial data on a remote computer, without having to keep my ssh session to the remote computer alive.



    I have tried:




    picocom <my options>


    This dies when I logout.




    picocom <my options> & 


    No output on terminal, and exiting picocom with C-a C-x leaves the job as stopped, it doesn't kill it (I need to kill -9, a simple kill on the job does not work. I then have to manually clean the tty lock in /var/lock/).




    picocom <my options> > tmp/data.log&


    then in another ssh session:



    tail -f tmp/data.log


    No data cames out in the file data.log.




    bash -c "picocom --baud 115200 /dev/ttyACM1 > /home/pi/tmp/data.log" &


    No output to the file either. The job becomes "Stopped" right away.




    nohup sh -c "picocom --baud 115200 /dev/ttyACM1 > /home/pi/tmp/data.log" &


    I get the start output of picocom in the tailed file, but then the job is exited.




    Good to know as well: picocom does not react to C-z.



    My questions are:



    • is it at all possible to run picocom in the background?

    • what alternatives are there to log serial terminal without an open session?






    share|improve this question






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I would like picocom to log serial data on a remote computer, without having to keep my ssh session to the remote computer alive.



      I have tried:




      picocom <my options>


      This dies when I logout.




      picocom <my options> & 


      No output on terminal, and exiting picocom with C-a C-x leaves the job as stopped, it doesn't kill it (I need to kill -9, a simple kill on the job does not work. I then have to manually clean the tty lock in /var/lock/).




      picocom <my options> > tmp/data.log&


      then in another ssh session:



      tail -f tmp/data.log


      No data cames out in the file data.log.




      bash -c "picocom --baud 115200 /dev/ttyACM1 > /home/pi/tmp/data.log" &


      No output to the file either. The job becomes "Stopped" right away.




      nohup sh -c "picocom --baud 115200 /dev/ttyACM1 > /home/pi/tmp/data.log" &


      I get the start output of picocom in the tailed file, but then the job is exited.




      Good to know as well: picocom does not react to C-z.



      My questions are:



      • is it at all possible to run picocom in the background?

      • what alternatives are there to log serial terminal without an open session?






      share|improve this question












      I would like picocom to log serial data on a remote computer, without having to keep my ssh session to the remote computer alive.



      I have tried:




      picocom <my options>


      This dies when I logout.




      picocom <my options> & 


      No output on terminal, and exiting picocom with C-a C-x leaves the job as stopped, it doesn't kill it (I need to kill -9, a simple kill on the job does not work. I then have to manually clean the tty lock in /var/lock/).




      picocom <my options> > tmp/data.log&


      then in another ssh session:



      tail -f tmp/data.log


      No data cames out in the file data.log.




      bash -c "picocom --baud 115200 /dev/ttyACM1 > /home/pi/tmp/data.log" &


      No output to the file either. The job becomes "Stopped" right away.




      nohup sh -c "picocom --baud 115200 /dev/ttyACM1 > /home/pi/tmp/data.log" &


      I get the start output of picocom in the tailed file, but then the job is exited.




      Good to know as well: picocom does not react to C-z.



      My questions are:



      • is it at all possible to run picocom in the background?

      • what alternatives are there to log serial terminal without an open session?








      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 31 at 13:39









      Gauthier

      415518




      415518




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          An alternative is to setup the device with stty, then read it with cat:



          stty <my options>
          nohup sh -c "cat /dev/ttyACM0 > data.log" &





          share|improve this answer



























            up vote
            0
            down vote













            Assuming the user session is meant, you might be able to use screen with the -X option to send commands to a running screen session and the stuff command to send keystrokes to the current window.



            screen -dmS newScreen bash
            screen -S newScreen -X stuff "picocom <options>n"
            screen -ls
            screen -r <pid>


            Please take note to put the quotes around and the next line in order for the commands to be executed. *



            ... haven't checked if bash -c or tmux would be possible too.






            share|improve this answer




















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "106"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );








               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f420953%2frunning-picocom-in-the-background-without-open-session%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote



              accepted










              An alternative is to setup the device with stty, then read it with cat:



              stty <my options>
              nohup sh -c "cat /dev/ttyACM0 > data.log" &





              share|improve this answer
























                up vote
                1
                down vote



                accepted










                An alternative is to setup the device with stty, then read it with cat:



                stty <my options>
                nohup sh -c "cat /dev/ttyACM0 > data.log" &





                share|improve this answer






















                  up vote
                  1
                  down vote



                  accepted







                  up vote
                  1
                  down vote



                  accepted






                  An alternative is to setup the device with stty, then read it with cat:



                  stty <my options>
                  nohup sh -c "cat /dev/ttyACM0 > data.log" &





                  share|improve this answer












                  An alternative is to setup the device with stty, then read it with cat:



                  stty <my options>
                  nohup sh -c "cat /dev/ttyACM0 > data.log" &






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 31 at 16:07









                  Gauthier

                  415518




                  415518






















                      up vote
                      0
                      down vote













                      Assuming the user session is meant, you might be able to use screen with the -X option to send commands to a running screen session and the stuff command to send keystrokes to the current window.



                      screen -dmS newScreen bash
                      screen -S newScreen -X stuff "picocom <options>n"
                      screen -ls
                      screen -r <pid>


                      Please take note to put the quotes around and the next line in order for the commands to be executed. *



                      ... haven't checked if bash -c or tmux would be possible too.






                      share|improve this answer
























                        up vote
                        0
                        down vote













                        Assuming the user session is meant, you might be able to use screen with the -X option to send commands to a running screen session and the stuff command to send keystrokes to the current window.



                        screen -dmS newScreen bash
                        screen -S newScreen -X stuff "picocom <options>n"
                        screen -ls
                        screen -r <pid>


                        Please take note to put the quotes around and the next line in order for the commands to be executed. *



                        ... haven't checked if bash -c or tmux would be possible too.






                        share|improve this answer






















                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          Assuming the user session is meant, you might be able to use screen with the -X option to send commands to a running screen session and the stuff command to send keystrokes to the current window.



                          screen -dmS newScreen bash
                          screen -S newScreen -X stuff "picocom <options>n"
                          screen -ls
                          screen -r <pid>


                          Please take note to put the quotes around and the next line in order for the commands to be executed. *



                          ... haven't checked if bash -c or tmux would be possible too.






                          share|improve this answer












                          Assuming the user session is meant, you might be able to use screen with the -X option to send commands to a running screen session and the stuff command to send keystrokes to the current window.



                          screen -dmS newScreen bash
                          screen -S newScreen -X stuff "picocom <options>n"
                          screen -ls
                          screen -r <pid>


                          Please take note to put the quotes around and the next line in order for the commands to be executed. *



                          ... haven't checked if bash -c or tmux would be possible too.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 31 at 14:36









                          U880D

                          401314




                          401314






















                               

                              draft saved


                              draft discarded


























                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f420953%2frunning-picocom-in-the-background-without-open-session%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              How to check contact read email or not when send email to Individual?

                              Bahrain

                              Postfix configuration issue with fips on centos 7; mailgun relay