Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

enable KEEPALIVE at TCP/IP socket

Broer van Smeden
Occasional Visitor

enable KEEPALIVE at TCP/IP socket

We want ot enable the SO_KEEPALIVE option on a socket.
We have written next program to do so, but no keep alive signal is received at the other party. When running the same program on LINUX, it will work. What are we doing wrong?
We are running OpenVMS 7.3-2 on AXP.
Program is added, it takes two paremeters:
- ip address
- port number
4 REPLIES

Re: enable KEEPALIVE at TCP/IP socket

Works for me:

LASSIE_2> foo 127.0.0.1 23
Connected (0)
Timer: 60
Got: -1
Got: -5
Got: 1


LASSIE_3> tcpip sho dev/full bg16037
Device_socket: bg16037 Type: STREAM
.......

Options: KEEP
State: ISCONNECTED
RCV Buff: ASYNC
SND Buff: ASYNC


The first keepalive packet will not
be sent for two hours. To adjust:

$ sysconfig -r inet tcp_keepidle=

Steve

Re: enable KEEPALIVE at TCP/IP socket

Hmm, units are in half seconds. You program times out in around that time.

Steve
Broer van Smeden
Occasional Visitor

Re: enable KEEPALIVE at TCP/IP socket

We are running the next versions

TCPIP> show version

Compaq TCP/IP Services for OpenVMS Alpha Version V5.3 - ECO 4
on a COMPAQ AlphaServer DS20E 833 MHz running OpenVMS V7.3-2


How did you determine which BG device is used?
Broer van Smeden
Occasional Visitor

Re: enable KEEPALIVE at TCP/IP socket

Ok, when using SDA, found out that the process is using next device.
So it seems that KEPPALIVE is on, but how about the other settings.
Next options were our intensions:
-Send keep alive after 60 seconds idle time
-Send the next keep alive after 5 seconds if it fails to do
- After 3 try, it should signal the disconnection.

I also added the TCPIP settings:



Device_socket: bg6343 Type: STREAM
LOCAL REMOTE
Port: 50151 20005
Host: 10.13.1.36 10.254.8.148
Service:

RECEIVE SEND
Queued I/O 0 0
Q0LEN 0 Socket buffer bytes 0 0
QLEN 0 Socket buffer quota 61440 61440
QLIMIT 0 Total buffer alloc 0 0
TIMEO 0 Total buffer limit 491520 491520
ERROR 0 Buffer or I/O waits 1 0
OOBMARK 0 Buffer or I/O drops 0 0
I/O completed 1 0
Bytes transferred 0 0

Options: KEEP
State: ISCONNECTED PRIV
RCV Buff: WAIT
SND Buff: None


$ tcpip sysconfig -q inet
inet:
icmp_rejectcodemask = 0
inifaddr_hsize = 32
ipdefttl = 64
ipdirected_broadcast = 0
ipforwarding = 0
ipfragttl = 60
ipgateway = 0
ipport_userreserved = 65535
ipport_userreserved_min = 49152
ipqmaxlen = 1024
ipqs = 1
ipsendredirects = 1
ipsrcroute = 1
pmtu_decrease_intvl = 1200
pmtu_enabled = 1
pmtu_increase_intvl = 240
pmtu_rt_check_intvl = 20
subnetsarelocal = 1
tcbhashnum = 1
tcbhashsize = 512
tcbquicklisten = 1
tcp_compat_42 = 1
tcp_cwnd_segments = 2
tcp_dont_winscale = 0
tcp_keepalive_default = 0
tcp_keepcnt = 8
tcp_keepidle = 14400
tcp_keepinit = 150
tcp_keepintvl = 150
tcp_msl = 60
tcp_mssdflt = 536
tcpnodelack = 0
tcp_recvspace = 61440
tcp_rexmit_interval_min = 2
tcp_rexmtmax = 128
tcprexmtthresh = 3
tcp_rttdflt = 3
tcp_sendspace = 61440
tcp_ttl = 60
tcptwreorder = 0
tcp_urgent_42 = 1
udpcksum = 1
udp_recvspace = 42080
udp_sendspace = 9216
udp_ttl = 30
ovms_nobroadcastcheck = 0
ovms_printf_to_opcom = 1