Something that people moving from TCP_OS to STCP notice right off the bat is that the set of TCP statistics displayed by the TCP_OS netstat command is quite a bit richer than that displayed by STCP. STCP’s netstat statistics displays the standard RFC-1213 TCP statistics. Statistics like, duplicate acks, duplicate data, out of order packets or window probe counts are missing. However, many of the statistics are available as part of the output displayed by the analyze_system stcp_meters request. Try the command:
analyze_system -request_line ‘stcp_meters -all -long’ -quit
The stcp_meters arguments and output are documented in the OpenVOS System Analysis (R073) manual, available at http://stratadoc.stratus.com. The data set is not the same as that of the TCP_OS command; some counters like “connections dropped by retransmit” are missing but there are also new counters like “window set zero after receive”. One nice touch is that the counter percentage is auto-magically calculated and presented.
A major problem with the netstat TCP statistics of both TCP_OS and STCP is that they are for the entire module, counters for each connection that ever existed (at least for the current boot) are added together to get the displayed values. Issues, like unacceptable retransmissions, that are affecting one or a few connections can get lost in the overall counts. The default stcp_meters behavior has the same problem, it aggregates the counters from all connections since the current boot; BUT, stcp_meters can take as an argument the PCB (protocol control block) address of a single connection and display the statistics for just that one connection; which makes it a significant debugging aid. To find the PCB address you execute netstat with the PCB_addr argument, yes the PCB is in upper case. Once netstat completes you find the connection of interest and the PCB address is in the first column.
The following macro does this for you, running netstat, locating the connection of interest, extracting the PCB address and then running stcp_meters. The macro takes either the PCB address if you already know it (in which case it skips most of the above steps) or 2 strings to help identify the connection of interest. The usage message indicates that the strings should be the local IP address the local port number and the remote IP address remote port number. This will uniquely identify the connection but you might be able to get away with less, for example just the local port number and the remote IP address. If the specified strings identify more than 1 connection then meters for each of the connections will be displayed. The netstat line will appear above the meters to identify what connection the meters are for.
If you want to display meters for all your established connections try the command
get_connection_meters -local ESTAB -remote :
In this instance the arguments do not represent the local and remote addresses but the state ESTABLISHED and any line with a colon in it.
& get_connection_meters begins here & & get_connection_meters.cm & version 1.0 09-04-06 & [email protected] & &begin_parameters LOCAL option (-local),string REMOTE option (-remote),string PCB option(-pcb),string &end_parameters & & make sure extraneous stuff isn't echoed into the results file &if (process_type) = 'batch' &then &do set_ready -format off &echo no_command_lines &end & &if (length &PCB&) > 0 &then &do &if (length &LOCAL&) > 0 &then &goto ERROR_ADDRESS &if (length &REMOTE&) > 0 &then &goto ERROR_ADDRESS analyze_system -request_line (string stcp_meters &PCB& -all -long) -quit &return &end & &set_string FILE_1 (process_dir)>connect_stcp_meters_1.temp &set_string FILE_2 (process_dir)>connect_stcp_meters_2.temp & &if (length &LOCAL&) = 0 &then &goto ERROR_ADDRESS &if (length &REMOTE&) = 0 &then &goto ERROR_ADDRESS attach_default_output &FILE_1& netstat -numeric -PCB_addr detach_default_output & display &FILE_1& -match &LOCAL& -output_path &FILE_2& -no_header display &FILE_2& -match &REMOTE& -output_path &FILE_1& -no_header & &attach_input analyze_system &set LINE 1 &label AGAIN &set_string CONNECTION (contents &FILE_1& &LINE& -hold) &if (end_of_file &FILE_1&) = 1 &then &do &if &LINE& = 1 &then &goto ERROR_NOT_FOUND &else &do quit &return &end &end & ..display_line ============================================================ ..display_line ============================================================ ..display_line ..display_line &CONNECTION& ..display_line &set_string PCB (substr (string &CONNECTION&) 1 8) stcp_meters &PCB& -all -long &set LINE (calc &LINE& + 1) &goto AGAIN & & &label ERROR_NOT_FOUND quit display_line display_line display_line Could not find specified connection in netstat output display_line &LOCAL& &REMOTE& &return & &label ERROR_ADDRESS display_line display_line You must enter either a PCB or BOTH local and remote IP:port display_line Usage: display_line ' get_connection_meters -pcb PCB' display_line ' or' display_line ' get_connection_meters -local IP:PORT -remote IP:PORT' &return & & get_connection_meters ends here