 
Purpose
As the name suggests this macro will loop through all interfaces on a module (except the #loop.module interface) doing a "netstat -interface". Output is date and time stamped and goes to the terminal screen.
Arguments
There are no arguments to this macro, just run it.
Notes
1: This macro can produce a lot of output. If you hit CANCEL, it cancels only the output from the current netstat command.
2: The first part of this command calls attach_default_output to redirect the output from ifconfig and then from display_file_status to files in the process_dir. If the macro is terminated by a BREAK before this portion of the macro completes it is possible that output will still be redirected. If that happens just type detach_default_output to redirect output back to the terminal window.
Example
| netstat-all-interfaces *************************************************************** 07-08-26.16:04:05 netstat -interface %phx_vos#sdlmuxA.m15.10.3 Ethernet adapters are grouped Number of failovers = 24 Active Device Statistics: MAC Type : CSMA/CD MAC Address: 00:00:a8:40:3b:6e Device Name: %phx_vos#sdlmuxA.m15.10.3 Line Speed : 1000 mb/s MAC Statistics: Received frames : 7399903 Received multicast and broadcast frames : 28066 . . . MAC Summary: Transmitted frames : 7390426 Transmitted octets : 724278340 Retransmitted frames : 0 Received frames : 7427969 Received octets : 779327185 Total of lost frames : 0 Partner Device Statistics: MAC Type : CSMA/CD MAC Address: 00:00:a8:60:3b:6e Device Name: %phx_vos#sdlmuxA.m15.10.3 Line Speed : 1000 mb/s MAC Statistics: Received frames : 2582773 Received multicast and broadcast frames : 6620 . . . Received octets : 266361520 Total of lost frames : 0 *************************************************************** 07-08-26.16:04:08 netstat -interface %phx_vos#sdlmuxB.m15.12.2 MAC Type : CSMA/CD . . . Received octets : 62431573 Total of lost frames : 0 *************************************************************** 07-08-26.16:04:09 netstat -interface %phx_vos#m15.13.2-12.1.1 MAC Type : CSMA/CD MAC Address: 00:00:a8:42:3b:6e . . . | 
| 
& netstat-all-interfaces begins here
&
& netstat-all-interfaces.cm
& version 1.0 07-08-25
& version 1.1 10-11-26  added disclaimer
& Noah Davids Stratus CAC noah.davids@stratus.com
&
& loops though all interfaces displayed by "ifconfig -all" (except for the
& loopback interface) and executes the "netstat -interface" command for the
& interface.
&
&
& This software is provided on an "AS IS" basis, WITHOUT ANY WARRANTY OR ANY
& SUPPORT OF ANY KIND. The AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES
& OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE.  This disclaimer
& applies, despite any verbal representations of any kind provided by the
& author or anyone else.
&
attach_default_output (process_dir)>ifconfig-all
>system>stcp>command_library>ifconfig -all
detach_default_output
display (process_dir)>ifconfig-all -match (system_name) &+
    -output_path (process_dir)>interfaces -no_header
attach_default_output (process_dir)>dfs
display_file_status (process_dir)>interfaces
detach_default_output
&set numInterfaces (ltrim (substr (contents (process_dir)>dfs 23) 27))
&set curLine 1
&while &curLine& <= &numInterfaces&
&set_string lineText (contents (process_dir)>interfaces &curLine&)
&set colonIndex (calc (index (string &lineText&) :) - 1)
&set_string interface (substr (string &lineText&) 1 &colonIndex&)
display_line
display_line ***************************************************************   
display_line (date).(time)     netstat -interface &interface&
>system>stcp>command_library>netstat -interface &interface&
&set curLine (calc &curLine& + 1)
&end
&
& netstat-all-interfaces ends here
 | 
 
 Send comments and suggestions
Send comments and suggestions