“ss -i” equivalent for AIX

port=636

lsof -i:$port 2>/dev/null | awk ‘/ESTABLISHED/ && $5==”IPv4″ {print $6}’ | while read addr

do
echo “sockinfo $addr tcpcb”| kdb | /opt/freeware/bin/awk –non-decimal-data ‘ \
/snd_cwnd/ {print “CWND: ” (“0x”$2)+0} \
/snd_wnd./ {print “RWND: ” (“0x”$2)+0 “\nMY_RWND: ” (“0x”$4)+0} \
/snd_wnd_scale./ {print “RWND_SCALE: ” (“0x”$2)+0 “\nMY_RWND_SCALE: ” (“0x”$4)+0} \
/\s+t_flags./ {print”TCP_FLAGS: ” $0; getline; print ” ” $0} \
/^pvproc/ {print “PID: ” (“0x”$4)+0 “\nPPID: ” (“0x”$5)+0}’
done

TCP_FLAGS: t_flags……. 0600C3E0 (RFC1323|SENT_WS|RCVD_WS|SENT_TS|RCVD_TS|SACK_PROCESS|SACK_GENERATE|COPYFLAGS…
…)
RWND: 49232
MY_RWND: 262088
RWND_SCALE: 0
MY_RWND_SCALE: 3
CWND: 5828
PID: 6619168
PPID: 1

3 thoughts on ““ss -i” equivalent for AIX

  1. Reply
    calimero - 2020-01-06

    ce l’ho nero

    1. Reply
      Anonymous - 2020-01-07

      test

  2. Reply
    Anonymous - 2020-01-07

    test

Leave a Reply to Anonymous Cancel reply

Your email address will not be published. Required fields are marked *

Scroll to top
Click to access the login or register cheese