ICE Help NETWORK

From ICE Enterprises
Jump to navigation Jump to search
Go to the full list of ICE Help pages.

Summary: Network interface notes

Newer ICE products often involve data capture/playback over standard host network interfaces.

SETUP - system setup parameters

To get higher transfer rates on Linux, the system parameters for the max network buffer size must be set. The system administrator needs to set these parameters to allow large network buffers for UDP on Linux:

> sysctl -a | grep net.core
> sysctl -w net.core.rmem_max=16777216
> sysctl -w net.core.wmem_max=16777216

Add these lines to /etc/sysctl.conf to make them permanent. If you add or remove network cards, remove the old udev rules to properly renumber the existing interfaces:

> rm /etc/udev/rules.d/*-net.rules

Reboot the system and read the new auto generated file to find the current interfaces. Modify /etc/sysconfig/network-scripts/ifcfg-eth{0-N} to specify the interfaces hardware address. ICE Network Appliances use the subnet 192.168.N.XXX where N is the ethN of the network data port. Make sure to modify the HWADDR, IPADDR, NETWORK, and GATEWAY to reflect the ethN interface number. Then run /etc/init.d/network restart to apply the changes.

SERVICE - communications with ICE services using SNAPAPP or SNAPPER macros

The /SERVER=port switch runs the NeXtMidas SNAPPER macro in server mode. The /SERVICE=port switch runs the NeXtMidas SNAPAPP macro and its SNAPPER children in server mode.

It then has a browser interface at http://localhost:<port>. This page has links to /System, /Controls, /Registry, /Results, /Files, /System, and /Displays.

The Http /System interface supports any parameter with results access. The GC result is a table of all control widgets for the macro.

For example, to start a real time SNAPPER archive:

http://<host>:<port>/System/Set?GC.MODE.ACTION=RTARCHIVE

To get the current state of a transfer:

http://<host>:<port>/System/Get?GC.MODE.ACTION

To get the current state of an ARCHIVE file transfer:

http://<host>:<port>/System/Get?REG.NOOP.PROGRESS

this returns REG.NOOP.PROGRESS=frac or null if completed.

The Http /Controls, /Results and /Registry interfaces support a table syntax for control also used by the ICENET interface. Developers may write their own code to exercise this control mechanism.

For example: To start a SNAPPER macro in archive mode:

http://<host>:<port>/Controls/Set?MODE=RTARCHIVE

To change the freq and decimation control widgets of the macro:

http://<host>:<port>/Controls/Set?{FREQ=1.2,DEC=256}

To access members of the snapper macro's sourcepic primitive directly:

http://<host>:<port>/Registry/SP/Get?{FREQ=,DEC=,GAIN=}

To set and get multiple parameters in an atomic manner:

http://<host>:<port>/Controls/Set?{CHAN=11,FREQ=,DEC=}

where the entries without values execute as Gets.

If snapper is invoked with the /NBX=chns switch, the tuner export sourcepics are accessed as:

http://<host>:<port>/Registry/SPX<n>/Get?{FREQ=,DEC=,GAIN=,REPLAY=}

where <n> is the 1 based channel number. For example:

http://<host>:<port>/Registry/SPX5/Set?{FREQ=1.23,DEC=32,GAIN=0,REPLAY=Cont}

will start channel 5 in continuous mode with the given freq/dec/gain parameters.

http://<host>:<port>/Registry/SPX30/Set?{REPLAY=Stop}

will stop channel 30.

There are two special keys intercepted by the HTTP server:

/WAIT=n waits for N seconds before processing the next key
/SYNC   waits until the previous key has been processed

If /SYNC is the last key, the socket will not return an HTTP status ACK until the command has been processed.

The system status of the machine hosting an ICE service is available at:

http://<host>:<port>/System/

where is:

Top       - CPU usage
Ice-Disks - status of disk drives
Ice-Health - low-level status on an Ice-Block
Ice-Driver - card status and temps recorded by the driver
Ice-PICs - configuration of ICE-PICS
Ice-NICs - configuration of ICE-NICS
Ice-QICs - configuration of ICE-QICS

If ".tbl" is appended to the output will be in serialized table format for easy parsing. For example:

http://<host>:<port>/System/Ice-PICs.tbl

gets the ICEPIC configuration in table form.

ICENET - utility for communicating with ICE services macro from outside Midas

The ICENET routine in the $ICEROOT/test directory can be used to control and/or test ICE Network Appliances.

The public interface includes all control widgets exposed by the macro. These controls are accessed by key=value pairs where the key is the label of the control. The labels are listed in the page http://<host>:<port>/Controls or by the readout when a graphical widget has focus. To set a control, use the key=value syntax and just the key or key= to perform a get.

To start or stop an appliance that has already been instantiated:

>ice net SET udp:192.168.0.199:7777/192.168.0.123:9000 ACTION=REC
>ice net SET udp:192.168.0.199:7777/192.168.0.123:9000 ACTION=STOP

where 192.168.0.199 is the address of the controller NIC card and 192.168.0.123 is the address of the ICE Appliance.

To change the frequency of the 1st snapper case in the appliance:

>ice net SET udp:192.168.0.199:7777/192.168.0.123:9001 FREQ=10

By default, the SET and GET verbs address control widgets only. The routine can also be used to access any other object in the macro registry or reslts table. For instance:

>ice net SET udp:192.168.0.199:7777/192.168.0.123:9001 "/Controls?FREQ=10"

sets the same control as the previous example, and

>ice net GET udp:192.168.0.199:7777/192.168.0.123:9001 "/Registry/SP?CYCLE"

gets the current cycle count of the sourcepic primitive SP.

The ICENET routine can also acquire a snapshot of packet data off a local NIC card. By default, this routine checks for packet sequence errors and determines the aggregate data rate. To test a packet stream coming from an ICE Appliance for rate and/or drops:

>ice net ACQ udp:192.168.0.199:7777/224.1.40.%d:7777 testfile ICE 40e6 10

The loop count can be used to run the command multiple times with a single call. If the multicast address contains an %d, the loop count will be inserted to allow looping through a series of channels as if from a tuner bank.

For a description of each parameter, type:

>ice net

with no arguments.