Sending and Receiving Status Updates

The data component sends status updates to the management component as packet processing goes forward.

Only the flows' MDI information is sent. The code that sends the updates is in the function update_stats_for_flow(), which is called from the function process_packet(). Both functions are in the file monitube-data_packet.c.

As mentioned in Monitoring and Mirroring Data, the MDI delay factor and media loss rate components are updated continually, but measured with time factors of 1 and 10 seconds respectively. Because the end of the time frame is not discovered until it has passed, the MDI value for the time frame where the flow's previous packet was seen is sent when the first packet arrives in the current (new) time frame. With streaming IPTV traffic, you can expect to see packets in every time frame; however, the MDI calculation can account for time frames in which no packets were seen.

The update messages are funneled into a common queue, so that only one connection to the management component is needed for the updates. The data threads enqueue updates, while the main thread dequeues them and sends them to the management component.

Receiving Status Updates

Besides processing the configuration, the second major purpose of the management component is to receive status updates as they come and report them through the JUNOS CLI as requested by the show command (see Command User Interface). The management component does not request status updates from the data component; it accepts updates as the data component chooses to send them. Therefore, the management component must cache a status, and in doing so it could deviate slightly from the true status in the data component.

The code that receives status updates is in the function set_flow_stat() in the file monitube-mgmt_config.c. The function is caled from the function receive_message(), in the file monitube-mgmt_conn.c.

The status updates come in two forms. When any status update is received, the management component logs a message using the tracing facility.

The MDI of a flow is reported whenever there is traffic observed in the last second. By default, the management component does not know about any flows, but as it learns about them it keeps the result for a maximum of 5 minutes. If results are received for a flow that it already knows about, the result replaces the previously stored result (and the 5 minute timer is reset). For more information on when these updates are sent see Monitoring and Mirroring Data.

When a clear command is issued from the CLI and received, the management component deletes all stored results.

Return to The IPTV Monitor Application

2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:26:47 2010 for Juniper Networks Partner Solution Development Platform JUNOS SDK 10.2R1 by Doxygen 1.4.5