For Macintosh OS X

To view the keepalive value, use sysctl, in /usr/sbin/sysctl:

% sysctl net.inet.tcp.keepidle

Set the KEEPALIVE value, using sysctl:

% sudo sysctl -w net.inet.tcp.keepidle=n

where n is the keepalive interval.

The interval is the value of a timer that is counted down 2 times a second. Therefore, to set the keepalive interval to 15 minutes, use 60*15*2, or 1800.

NoteYou must have System Administration privileges to set keepalive. systole must be run under 'sudo'.