RuggedCom RS1600 Manual Do Utilizador

Página de 130
RuggedSwitch
™ User Guide 
Using RSH And SQL 
The combination of remote shell scripting and sql commands offer a means to 
interrogate and maintain large numbers of switches.   Consistency of configuration 
across sites may be verified by this method.  The following presents a simple 
example where the switches to interrogate are drawn from the file “switches”. 
Figure 77 Bulk Inspections Using RSH and SQL
C:> type switches 
10.0.1.1 
10.0.1.2 
10.0.1.3 
 
c:\> for /F %i in (switches) do rsh %i -l admin sql select from ethportcfg where 
flow_control = disabled 
 
C:\>rsh 10.0.1.1 -l admin sql select from ethportcfg where flow_control = 
disabled 
 
Port Name            Status   Media Type  Flow Control FEFI     Link Alarms 
5    Port 5          Enabled  Auto Select Disabled     Disabled Enabled 
 
1 records selected 
 
C:\>rsh 10.0.1.2 -l admin sql select from ethportcfg where flow_control = 
disabled 
 
0 records selected 
 
C:\>rsh 10.0.1.3 -l admin sql select from ethportcfg where flow_control = 
disabled 
 
Port Name            Status   Media Type  Flow Control FEFI     Link Alarms 
3    Port 3          Enabled  Auto Select Disabled     Disabled Enabled 
7    Port 7          Enabled  Auto Select Disabled     Disabled Enabled 
8    Port 8          Enabled  Auto Select Disabled     Disabled Enabled 
13   Port 13         Enabled  Auto Select Disabled     Disabled Enabled 
 
4 records selected 
 
 
RuggedCom