Keep connection alive between PC and board


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Keep connection alive between PC and board
# 1  
Old 09-02-2014
Linux Keep connection alive between PC and board

HI all,

I have armv7 board and i will execute script in host machine with ssh connection from board .

I have to test when board in standby mode the script runned in host remain working .
The result is the reverse when kernel is in standby mode on board.
SSH connection closed and the script end .

Any sugestion please

Thanks
# 2  
Old 09-02-2014
Hi,

There are two things that you can try;

The first is to check if there is a "tcp keep alive" available on the connection - this will be a session setting.

The next thing is to check if the OS on the armv7 (Which you don't mention) supports something like "nohup".

Regards

Dave
# 3  
Old 09-02-2014
yes
this is the value of net.ipv4.tcp_keepalive_intvl = 75

and my OS support nohup .
# 4  
Old 09-02-2014
OK,

Then both the following options would be open to you, you should choose the one that suits your requirements.

For the tcp keep alive,

This normally will keep the session alive when there is no interaction i.e. no keystrokes in e terminal session or screen traffic. It is normally set as seconds - so it seems to be currently set to 75 seconds. You should check the acceptable parametesr and adjust to suit your requirements, within the parameters if you can.

Nohup is something different;

It is normally used to run something from a terminal session, but gives the flexibility to disconnect the session without the process dying as well - however if there is output required from the script it should go to some kind of log file.

Normally used as follows - but without the quotes.

Code:
user $> nohup "my/script/is/here > "my/logfile/is/here" 2>&1

Although you may wish to handle logging and error loging in the script.

Regards

Dave
This User Gave Thanks to gull04 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Socket Keep-Alive

Hi I'm adding http 1.1 GET to my project and trying to use “Keep-Alive” HTTP connections to the host, The problem is when I recv() the first page, it succeeds. However, the 2nd consecutive recv() will receive zero bytes, for which I really have no idea. As per HTTP 1.1 I have Connection: ... (6 Replies)
Discussion started by: Projecteer
6 Replies

2. What is on Your Mind?

Is this forum alive?

Odd thing. I posted in the Solaris forum, new user, just asking for a bit of advice. Nothing too complicated. As of this post there have been 140 views and zero replies. So that got me thinking, is this normal? I had a look around, and I see the same thing on many other threads, and in other... (2 Replies)
Discussion started by: _JonB_
2 Replies

3. Solaris

keeping a process alive ?

Hello guys, I have one script running that I need to keep it running 24x7 so I'd like to know how can I implement a sort of monitoring process I mean if for some reason this process dies somehow it gets automatically started again. Thanks. (8 Replies)
Discussion started by: cerioni
8 Replies

4. UNIX for Dummies Questions & Answers

How to find the server ip is alive ?

How to write a shell script to find ports are open for the server. Thanks in advance. regards krackjack (4 Replies)
Discussion started by: krackjack
4 Replies

5. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

6. Shell Programming and Scripting

Can we keep our script alive while logging out.

Hi I want to keep my script running even when i am logged off from the box. can we run the script in background which can automatically run every hour? Please advise. Thank you (1 Reply)
Discussion started by: Prateek007
1 Replies

7. UNIX for Dummies Questions & Answers

Socket still alive!!

Hi, I'm investigate about a problem regarding a connection between two server (S1 and S2). A client software on S1 made a pool of connections on S2; for some reason some connections end but sockets still alive on S2 and not on S1. I always knew about sockets as a pair of processes; is it... (1 Reply)
Discussion started by: grado
1 Replies

8. UNIX for Dummies Questions & Answers

Check whether a process is alive or not

Hi Everybody I have small requirement that needs to be implemented in shell script. Currently i have shell script which invokes a java process say "Process A" which runs in background. If some one tries to invoke again the same shell script , then there should be some mechanism inside the... (23 Replies)
Discussion started by: appleforme1415
23 Replies

9. Shell Programming and Scripting

help to ping a host, is it alive or not ...

hello to everyone, i was wondering if you could help me with a script im working on, it's kind of simple but i dont have a lot experience on unix comands: well, here it is: you might apreciate the infinite while loop :D, it is supossed to be running on the server all day scaning it every 5... (12 Replies)
Discussion started by: sx3v1l_1n51de
12 Replies
Login or Register to Ask a Question