Thanks for everyone’s assistance.

I did not get a chance until now to update the situation…

Basically, this is what I did..

I did not look into the screen comment btw….


1)      When connected to the SDR via Ethernet cable, at the terminal type – 
nohup python namOfFile.py &

2)      This will give you a PID (process ID) that is running on the Linux 
embedded system

3)      Unhook the ethernet from the SDR

4)      If running a VM as I was, close VM window

5)      When run is done, reconnect Ethernet cable to SDR (assuming you never 
took Ethernet cable off of laptop)

6)      Open a VM, and then a terminal window

7)      Type the command – kill -9 PID (whatever PID was given in step 2

8)      This should stop the process, but it did not for me.. so an extra step 
was to run another unrelated program that re-images/downloads the bit file to 
the FPGA.

9)      Then quickly stop this new program.

10)   Then I was able to ssh the created data file.

Thanks again for everyone’s assistance, and I hope this may help someone in the 
future.

Konstantin

From: Ian Buckley [mailto:i...@ionconcepts.com]
Sent: Wednesday, April 04, 2018 1:33 AM
To: Matheou, Konstantin J. (GRC-LCI0)[ZIN TECHNOLOGIES INC] 
<konstantin.j.math...@nasa.gov>
Cc: Marcus D. Leech <mle...@ripnet.com>; usrp-users <usrp-users@lists.ettus.com>
Subject: Re: [USRP-users] Assistance In Stopping Python Script After Removing 
Ethernet Connection


On Apr 3, 2018, at 10:24 PM, Matheou, Konstantin J. (GRC-LCI0)[ZIN TECHNOLOGIES 
INC] via USRP-users 
<usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com>> wrote:

Thanks Marcus…

Actually, this is what I am looking into currently.

Unfortunately, I get the PID, but when I reconnect and go to terminal, the kill 
-9 PID seems to not stop it.

I am currently using a VM to do this on a Windows OS platform.  I am not sure 
if this is the reason…

So, it seems that when I reconnect, I cannot kill the process.

Any more advice?

Thanks

From: USRP-users [mailto:usrp-users-boun...@lists.ettus.com] On Behalf Of 
Marcus D. Leech via USRP-users
Sent: Wednesday, April 04, 2018 12:51 AM
To: usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com>
Subject: Re: [USRP-users] Assistance In Stopping Python Script After Removing 
Ethernet Connection

On 04/04/2018 12:37 AM, Matheou, Konstantin J. (GRC-LCI0)[ZIN TECHNOLOGIES INC] 
via USRP-users wrote:
To All,

I have tried to use the Header block approach which is found on the Internet to 
try to fix this issue…

Here is the issue…

I am capturing samples via an antenna on the E310.

I used GRC to create the flowgraph to capture samples to go to a file.

But, I have to remove the ethernet cable to the E310.

When this is done, it seems the data collecting process stops.

Is there a work around using GRC?

Or do I have to create another python code to run the GRC created python code 
for a certain amount of time using Linux or python code?

If anyone has any advice or example code, it would be much appreciated.

Thanks,

Konstantin

WHen you SSH into a machine, and disconnect the cable, eventually, SSH will 
drop the connection, which causes your session to be terminated, including
  any processes that you have have started from that session.

You could look into the "nohup" command....


_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com<mailto:USRP-users@lists.ettus.com>
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Could this be as simple as running your python in a shell under “screen” so the 
shell doesn’t die on disconnect and you can reconnect to the interactive shell 
later?

https://www.gnu.org/software/screen/manual/screen.html

_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
  • [US... Matheou, Konstantin J. (GRC-LCI0)[ZIN TECHNOLOGIES INC] via USRP-users
    • ... Marcus D. Leech via USRP-users
      • ... Matheou, Konstantin J. (GRC-LCI0)[ZIN TECHNOLOGIES INC] via USRP-users
        • ... Ian Buckley via USRP-users
          • ... Philip Balister via USRP-users
          • ... Matheou, Konstantin J. (GRC-LCI0)[ZIN TECHNOLOGIES INC] via USRP-users

Reply via email to