- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to enable TCP Keepalive on a system?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2005 06:36 PM
тАО11-14-2005 06:36 PM
How to enable TCP Keepalive on a system?
On Tru64 there is a system parameter named tcp_keepalives_default that enables (1) or disables (0) TCP keepalive for all sockets.
Do we have something similar on HP-UX?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2005 07:00 PM
тАО11-14-2005 07:00 PM
Re: How to enable TCP Keepalive on a system?
tcp_keepalive_detached_interval - Send keepalive probes for detached TCP
tcp_keepalive_interval - Interval for sending keepalive probes
It is the tunables regarding to keep alive setting with TCP.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2005 07:06 PM
тАО11-14-2005 07:06 PM
Re: How to enable TCP Keepalive on a system?
Right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2005 11:58 PM
тАО11-14-2005 11:58 PM
Re: How to enable TCP Keepalive on a system?
The default values set keepalives to probe every 2 hours.
You can modify these values, its suggested to never go below 10 minutes.
Use the ndd -h command to view the help options.
# ndd -h tcp_keepalive_interval
tcp_keepalive_interval:
Interval for sending keep-alive probes.
If any activity has occurred on the connection or if there is
any unacknowledged data when the time-out period expires, the
timer is simply restarted. If the remote system has crashed
and rebooted, it will presumably know nothing about this
connection, and it will issue an RST in response to the ACK.
Receipt of the RST will terminate the connection.
If the keepalive packet is not ACK'd by the remote TCP, the normal
retransmission time-out will eventually exceed threshold R2,
and the connection will be terminated.
With this keepalive behavior, a connection can time-out and
terminate without actually receiving an RST from the remote TCP.
[10000, 10*24*3600000] Default: 2 * 3600000 (2 hours)
#
Some useful ndd commands:
To see the supported tunables
# ndd -h supported
To view one particular variable
# ndd -h variable_name
To get a value:
ndd -get /dev/tcp tcp_keepalive_interval
7200000
#
To set tcp_keepalive_interval to 1 hour
# ndd -set /dev/tcp tcp_keepalive_interval 3600000
To make this setting permanent you have to edit the /etc/rc.config.d/nddconf file. There are examples in the header.
See the man page for ndd for more information.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 12:41 PM
тАО11-15-2005 12:41 PM
Re: How to enable TCP Keepalive on a system?
Now, if the application cannot be enhanced (FWIW, it is rather non-portable to count on the transport stack to have a setting...) directly to make the setsockopt() call, it may be possible to write a little LD_PRELOADable shim library that intercepts say calls to socket(), makes the call to the real socket() routine and then if the conditions are correct also makes a call to setsockopt(). If socket() the right one to intercept, then perhaps connect() and accept() (or listen())
Still, it would be best if the application could be enhanced to have a setting that tells _it_ to make a setsockopt() call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 12:42 PM
тАО11-15-2005 12:42 PM