LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-09-2015, 08:30 AM   #1
TheDonLyle
LQ Newbie
 
Registered: Mar 2015
Posts: 3

Rep: Reputation: Disabled
When will "sysctl -update net.ipv4.tcp_keepalive_probes 3" take effect?


I am a complete Linux newbie.

I work on HP NonStop (aka Tandem) servers which have Linux servers attached that provide the TCP/IP stack/connectivity.

The question I have (and I've spent hours trawling the net) is:
If I issue a "sysctl -update net.ipv4.tcp_keepalive_probes 3" I assume that it will apply to new sessions established after the command is issued but, will it apply to currently active sockets/sessions?

Regards
Don
 
Old 03-09-2015, 02:31 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,880

Rep: Reputation: 162Reputation: 162
It shouldn't affect existing session because they already connected.
 
Old 03-10-2015, 03:50 AM   #3
TheDonLyle
LQ Newbie
 
Registered: Mar 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
I work in a 24x7 environment (99.999%+ availability - ATM etc) and need to know precisely.
I know nearly all of the answers regarding my core machine but not the Linux boxes that have been bolted on to my machine (in this incarnation) to provide IP comms.

Does shouldn't = will not?

Regards
Don
 
Old 03-10-2015, 02:27 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,880

Rep: Reputation: 162Reputation: 162
You can know precisely by testing. Do following things and watch new and old session, how long these sessions are declared dead session.

- net.ipv4.tcp_keepalive_time - time of connection inactivity after which
the first keep alive request is sent
- net.ipv4.tcp_keepalive_probes - number of keep alive requests retransmitted
before the connection is considered broken
- net.ipv4.tcp_keepalive_intvl - time interval between keep alive probes

You can manipulate with these settings using the following command:

sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_probes=3 net.ipv4.tcp_keepalive_intvl=10

This sample command changes TCP keepalive timeout to 60 seconds with 3 probes,
10 seconds gap between each. With this, your application will detect dead TCP
connections after 90 seconds (60 + 10 + 10 + 10).
 
Old 03-10-2015, 05:23 PM   #5
TheDonLyle
LQ Newbie
 
Registered: Mar 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
I fully understand that I can establish the answer to my own question by testing but human and computing resources are at a premium. Naively, I expected that someone in the Linux world could simply and definitively answer my question.
Regards Don

Last edited by TheDonLyle; 03-10-2015 at 05:31 PM. Reason: typo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "net rpc" "failed to connect to ipc$ share on" or "unable to find a suitable server" larieu Linux - General 0 11-09-2014 12:45 AM
Tricky net.ipv4 variables in sysctl.conf fandango512 Linux - Networking 0 10-18-2008 08:18 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM
SYSCTL errors on net.ipv4.route.flush with unknown error 1 Electro Linux - Networking 1 08-01-2005 12:48 AM
difference between "Web server local URL" and "IPv4 address"? kpachopoulos Linux - General 2 09-17-2004 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration