AIX, Solaris and {Free,Open,Net}BSD results are also not consistent with
regards to units used for reporting:

AIX$ no -o tcp_keepidle -o tcp_keepintvl
tcp_keepidle = 14400
tcp_keepintvl = 150

{phargrov@solaris11-amd64 ~}$ ndd -get /dev/tcp tcp_keepalive_interval
7200000

[phargrov@freebsd10-amd64 ~]$ sysctl net.inet.tcp.keepidle
net.inet.tcp.keepintvl
net.inet.tcp.keepidle: 7200000
net.inet.tcp.keepintvl: 75000

[openbsd5-amd64 ~]$ sysctl net.inet.tcp.keepidle net.inet.tcp.keepintvl
net.inet.tcp.keepidle=14400
net.inet.tcp.keepintvl=150

[netbsd6-amd64 ~]$ /sbin/sysctl net.inet.tcp.keepidle net.inet.tcp.keepintvl
net.inet.tcp.keepidle = 14400
net.inet.tcp.keepintvl = 150


At least AIX documents these values as having units of HALF SECOND.
I suspect that that is also true of the OpenBSD and NetBSD values above,
because then all keepidle values seen so far are the same 2-hours  (except
Jeff's one RHEL-6.5 system).


I *was* able to find units use for setting these documented on several
systems:

On Linux, FreeBSD and NetBSD the respective tcp(4) man pages all document
TCP_KEEPIDLE and TCP_KEEPINTVL socket options as taking *seconds* for their
arguments.
Even AIX-7.1's setsockopt manpage says seconds are used to set these two
socket options.

My OS X 10.8 system's tcp(4) has different names (TCP_KEEPALIVE and
TCP_CONNECTIONTIMEOUT) which are documented as corresponding to the sysctl
values, but it *does* agree that units of seconds are used to set these
options.

I didn't find OpenBSD or Solaris docs ("grep -rl TCP_KEEP /usr/share/man"
didn't find any matches).

So in summary:

+ sysctl (or equiv) reports in non-standardized units (including seconds,
half-seconds and milliseconds).
+ setsockopt() uses seconds on all systems I found documented (Linux, OS X,
FreeBSD, NetBSD and AIX)

-Paul

P.S.
re: AIX - seriously "no" (I am guessing (n)etwork (o)ptions) as the command
name!


On Sat, May 16, 2015 at 6:25 AM, Chris Samuel <sam...@unimelb.edu.au> wrote:

> On Sat, 16 May 2015 12:49:51 PM Jeff Squyres wrote:
>
> > Linux / RHEL 6.5 / 2.6.32 kernel (this is clearly in seconds):
> >
> > $ sysctl net.ipv4.tcp_keepalive_time
> > net.ipv4.tcp_keepalive_time = 1800
>
> I suspect that's a local customisation, all Linux systems I've got access
> to
> (including RHEL 6.4/6.5/6.6) report:
>
> net.ipv4.tcp_keepalive_time = 7200
>
> All the best,
> Chris
> --
>  Christopher Samuel        Senior Systems Administrator
>  VLSCI - Victorian Life Sciences Computation Initiative
>  Email: sam...@unimelb.edu.au Phone: +61 (0)3 903 55545
>  http://www.vlsci.org.au/      http://twitter.com/vlsci
>
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post:
> http://www.open-mpi.org/community/lists/devel/2015/05/17411.php
>



-- 
Paul H. Hargrove                          phhargr...@lbl.gov
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department               Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900

Reply via email to