Detection of network cables getting unplugged
Inherent problem with TCP/IP sockets is that any network cables unplugged along the route from one side to the other will cause a loss of connection without any notification. To address this issue at the socket level, one recommended approach is to use TCP keepalive mechanism to detect Dead Peers/Process crash/NW cable disconnect. It requires one to enable TCP/IP networking in order to use it. You also need procfs support and sysctl support to be able to configure the kernel parameters at runtime.
In Linux system the following 3 system params needs to be overwritten with user defined values
With the sample prototype setting the above 3 params to 30, 10, 5 was able to detect NW disconnect in ~1.25 min (30s + 10 x 5 = 80s)
ON Solaris platform
To achive the same in Solaris adjusted the foll 2 params
But results are not very satisfying, I’m not able to fine tune system parameters to have the disconnect happen after a specific time. I also noticed that Solaris does not have ‘tcp_keepalive_probes’ so how can one specify the number of re-tries before disconnecting? Basically If I need the socket disconnection to happen in about 80s/100s to what values should I set the Sol NW params?
Thanks in Advance for your help