Upgrading Firmware and Managing Configurations

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”.

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:\

Figure 189 Using RSH and SQL

ROS™ v3.5

258

RS400

Page 258
Image 258
RuggedCom RS400 manual Using RSH and SQL