RuggedCom Welder RS400 用户手册

下载
页码 275
Upgrading Firmware and Managing Configurations 
 
 
ROS™  v3.5 
258 
RS400 
14.3.6  Using RSH and SQL 
Combination of remote shell scripting and SQL commands offers a means to interrogate and 
maintain a large number of devices. Consistency of configuration across sites may be verified 
by this method. The following presents a simple example where the devices to interrogate are 
drawn from the file “Devices”. 
 
Figure 189 Using RSH and SQL 
 
C:> type Devices 
10.0.1.1 
10.0.1.2 
10.0.1.3 
 
c:\> for /F %i in (devices) do rsh %i -l admin,admin sql select from ethportcfg 
where flow_control = disabled 
 
C:\>rsh 10.0.1.1 -l admin,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,admin sql select from ethportcfg where flow_control = 
disabled 
 
0 records selected 
 
C:\>rsh 10.0.1.3 -l admin,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 
 
C:\