NPR Tutorial >> The Remote Laboratory Interface | TOC |
In the preceding page The Remote Laboratory Interface, we successfully sent ping traffic from n1p3 to n2p2 and back. But how do we know that the packets actually travelled through ports 1.3, 1.4, 2.1, 2.2 and back rather than taking some other route (e.g., over the control network)? The NPR has a large number of monitoring points that can be displayed in real-time to verify traffic behavior. There are monitoring menus associated with:
An example based on some of the concepts discussed on this page is given in NPR Tutorial => Examples => The_Remote_Laboratory_Interface. The sections in this page are:
The NPR has numerous byte and packet statistics counters. Some of them are updated as a packet moves through an NPR. As a general rule, the statistics counters come in byte-packet pairs; i.e., if there is a byte counter there is also a packet counter. The RLI allows you to access all of the counters. However, some counters have specific menu items while the remaining counters must be accessed through the general ReadRegisterByte and ReadRegisterPacket facilities described in a later page.
Each NPR port has a monitoring menu that can be viewed by selecting the port of the NPR icon. The figure (right) shows the menu at port 1.3 (left NPR). The five menu items allow you to monitor the following:
When you ask that a statistics counter be monitored, the ONL daemon periodically reads the counter at a user-specified polling rate and sends the value to your RLI. By default, the period is one second which is adequate for most uses. (Note: You can request a smaller time interval, but keep in mind that it is unlikely that the ONL daemon can monitor more often than once every 0.25 seconds.) You can either display the data (discussed here) or log the data to a file. In displays, you have a wide range of choices such as rate versus absolute value and units (e.g., bytes, bytes/sec, Mb, Kb/s).
The concepts of rate and absolute value sometimes lead to confusion. Choosing absolute value means that at each monitoring time point, you want the value of a counter as read or a value that has been converted by your choice of unit (e.g., bytes to MB). However, choosing rate means that at each monitoring time point, you want the rate of change since the previous monitoring time point. More precisely, suppose that the counter values at monitoring time points are X0, X1, X2, etc. Then, if you chose absolute value, the values displayed will be c X0, c X1, c X2, etc. where c is a conversion constant. If you chose rate, the values displayed will be c (X1-X0)/T, c (X2-X1)/T, c (X3-X2)/T, etc. where T is the polling rate (period). When T is one second, rate is equivalent to the differences (X1-X0), (X2-X1), (X3-X2), etc.
For example, absolute value is often used when monitoring queue length. If the monitored values are 1500 bytes, 9000 bytes, 3000 bytes, etc. and the units is specified as KB (Kilobytes), the displayed absolute values will be 1.5 KB, 9.0 KB, 3.0 KB, etc. On the other hand, if rate was chosen when the monitering period was 0.25 second, the first two displayed rates would be 30 KB/s = (9-1.5)/0.25 and -24 KB/s = (3-9)/0.25. But if the monitoring period was one second, the two displayed rates would be 7.5 KB/s and 6 KB/s respectively Rate is used more often when monitoring bandwidth.
To start a new monitoring chart, select
Monitoring => Add Monitoring Display in the main RLI window.
And then enter the name of the chart in the Graph Title
dialogue box.
We are creating a chart labeled "pkts per sec" in the figure (right).
Now all monitoring selections will be focussed on this chart.
If there were more than one monitoring chart/window, you can change the charting focus to a particular chart by selecting Parameter => Add Parameter in the monitoring window that should be the new focus.
The figure (left) shows us electing to monitor RXPKT (the
packets-received counter) at NPR 1:Port 3 by opening the
menu at port 1.3 and selecting Port 3 => Monitoring => RXPKT.
An Add Parameter dialogue box will appear.
Here, we have enterred 0.25 in the Enter Polling Rate box to override the one-second default polling rate. We have also checked the rate box to override the absolute value monitoring mode.
A blue RXPKT line immediately appears in the pkts per sec chart when we select Enter (not shown) in the dialogue box. Note: If resources have already been committed, monitoring does not require a File => Commit. The Y-axis is labeled Packets, and the X-axis is labeled time(secs). The Y-axis label can be changed by selecting View => Change Y-axis label and entering the new label in the dialogue box.
The X-slider at the bottom is used to move the
chart back and forth in time.
If moved away from the rightmost position, the chart freezes,
and new data are not shown in the chart.
When moved back to the far right, the X-axis resumes its
time-window advance, and new values are added to the chart.
If you run long enough, you will not be able to move all the
way back to the beginning of an experiment because the RLI
has a fixed size data cache for each plot.
When it runs out of cach space, it deletes the oldest data.
To monitor points along the path between n1p3 and n2p2, we could continue to add plots for the packets-received or packets-transmitted counters at ports 1.4, 2.1, and 2.2. But we would discover that all of the line plots were labeled as RXPKT or TXPKT. We change the labeling to eliminate this ambiguity.
The RXPKT label can be selected to open a dialogue box that allows you to change the attributes of the RXPKT plot. The figure (right) shows that we have changed the label to RXPKT 1.3 indicating that it is the RXPKT field for port 1.3.
Other fields reflect options that were specified earlier.
The rate radio button is marked because we had
selected rate over absolute value.
And the window indicates the polling rate is 0.25 seconds.
The units are packets per second and not scaled (1.0 scaling factor).
We have elected to accept the option of a solid line instead of a dashed line.
Selecting Change applies our changes to the current line plot.
The figure (right) shows that we have added plots for the
packets-received (RXPKT) at ports 1.3 and 2.1 and the
packets-transmitted (TXPKT) at ports 1.4, 2.2 and 1.3.
We have also changed the default plot labels.
We expect the peak packet rate to be 4 packets per second since
there is one ping packet sent every second and our monitoring
period is 0.25 second (4 = 1/0.25); that is, during each 0.25 second
monitoring period, the packet counters will either remain the same
(rate = 0) or increase by 1.
The "pkts per sec" chart appears crowded, and the only two visible line plots are RXPKT 1.3 and TXPKT 2.2. Any hidden plot can be made visible (brought to the front) by passing the cursor over the line plot label (not shown). We can modify the appearance of the chart to reveal more of the ping-like behavior: bandwidth spikes appearing approximately once per second. The charting features of the RLI allow the user to focus on a portion of a chart by zooming in and out along both the X- and Y-axes.
Left-clicking the X-axis at point X zooms in so that the rightmost X-value is X and also freezes the chart so that new values are not displayed. Dragging the X-axis slider to the far right resumes the display of new values.
In the figure (top right), the original chart had a time window
that ran approximately from time 299.0 to 349 with hash marks at
12.5-second intervals.
Left-clicking the X-axis at point X zooms in so that
the rightmost X-value is X; the leftmost X-value is unchanged;
and the chart freezes so that new values are not displayed.
The effect is to reduce the time interval covered by the chart.
The bottom right figure shows the effect of several X-scalings
followed by dragging the X-axis slider to the far right to resume
the display of new values.
It reveals the expected spikes separated at intervals of one-second.
Similarly, left-clicking the y-axis at point Y zooms in so that the topmost y-value is Y. Other things you can do (not shown) include:
You can also show the approximate X- and Y-coordinates within
a chart by selecting View => Show Values and then
left clicking the display point.
Monitoring bandwidth instead of packet count should now be straightforward: Use the RXBYTE and TXBYTE counters instead of the RXPKT and TXPKT counters. The figure (right) shows the bandwidth of ping traffic arriving to port 1.3 after we have adjusted the X- and Y-scaling to reveal the ping behavior: there are four transmissions over a four-second period; and the peak bandwidth is almost 336 bytes/sec (the chart shows 324 bytes/sec).
We expect 336 bytes/sec since each ICMP packet carries 56 bytes of data
and is encapsulated in an 8-byte ICMP header and 20-byte IP header.
This means that each packet is 84 bytes.
Since the monitoring period is 0.25 second, the expected byte rate
is 4 x 84 or 336 bytes/sec.
The line plot dialogue box for byte counters is almost identical to
the packet counter ones.
The figure (right) shows that the default byte rate units of bytes/sec
can be changed to other units (e.g., Mb/s, Kb/s, MB/s, KB/s).
This section briefly describes other charting features.
The main RLI menu item Monitoring => Set Default Polling Rate
allows you to set the default polling rate to something other than
one second.
In most cases, the default should be sufficient,
but you can use it when you need more or less precision than offered
by a one-second polling period.
But note that the minimum practical monitoring period is about
0.25 second.
The RLI behavior when you choose a smaller period is undefined.
We have discussed most of the menu items in the View menu. The two remaining items are:
Parameter => Remove Parameter allows you to remove a line plot.
In the figure (right), selecting Parameter => Remove Parameter
shows the labels of the five line plot labels.
Selecting one causes the RLI to remove that line from the chart and
terminate monitoring for that line.
We will describe Parameter => Add Formula in the
Filters, Queues and Bandwidth .
But in short, it allows you to plot a line that is an arithmetic
composition of several time-series.
One such use is to create a stacked appearance where one line
is stacked on top of another.
We have not discussed any of the three selections from the Options menu. They are:
Revised: Tue, Aug 26, 2008
NPR Tutorial >> The Remote Laboratory Interface | TOC |