diff --git a/docker-compose/tango-prometheus-exporter/ska-tango-grafana-exporter b/docker-compose/tango-prometheus-exporter/ska-tango-grafana-exporter index dddb23ff587f6e9c837cdb77e7955e94272eca6f..6e48f0fddf5541bc66d9f57e31297c0027ea97b7 160000 --- a/docker-compose/tango-prometheus-exporter/ska-tango-grafana-exporter +++ b/docker-compose/tango-prometheus-exporter/ska-tango-grafana-exporter @@ -1 +1 @@ -Subproject commit dddb23ff587f6e9c837cdb77e7955e94272eca6f +Subproject commit 6e48f0fddf5541bc66d9f57e31297c0027ea97b7 diff --git a/docs/source/devices/sdp.rst b/docs/source/devices/sdp.rst index c4d4032f47e7e4988437adb54dc7778bd53dc4b1..2ca1ea6fa95e7295a21041d12242e15cec3b8001 100644 --- a/docs/source/devices/sdp.rst +++ b/docs/source/devices/sdp.rst @@ -62,6 +62,8 @@ Waveform Generator The antenna input of SDP can be replaced by an internal waveform generator for debugging and testing purposes. The generator is configured per antenna per FPGA: +.. note:: The Waveform Generator needs to be toggled off and on using ``FPGA_wg_enable_RW`` for new settings to become active on the station. + :FPGA_wg_enable_RW: Whether the waveform generator is enabled for each input. :type: ``bool[N_fpgas][N_ants_per_fpga]`` @@ -91,5 +93,6 @@ For example, the following code inserts a wave on LBA subband 102 on FPGAs 8 - 1 sdp.FPGA_wg_amplitude_RW = [[0.1] * 12] * 16 sdp.FPGA_wg_frequency_RW = [[102 * 200e6/1024] * 12] * 16 - # enable waveform generator + # toggle and enable waveform generator + sdp.FPGA_wg_enable_RW = [[False] * 12] * 16 sdp.FPGA_wg_enable_RW = [[True] * 12] * 16 diff --git a/docs/source/devices/sst-xst.rst b/docs/source/devices/sst-xst.rst index 092bdda832eb0493f93956f4aec8025410d0bf9b..cce03f691cc488c8c06d8910db9f3bd8da63a828 100644 --- a/docs/source/devices/sst-xst.rst +++ b/docs/source/devices/sst-xst.rst @@ -8,6 +8,8 @@ The statistics are exposed in two ways, as: - *Attributes*, representing the most recently received values, - *TCP stream*, to allow the capture and recording of the statistics over any period of time. +If the statistics are not received or zero, see :ref:`statistics-debugging`. + See the following links for a full description of the SST and XST monitoring and control points: - https://support.astron.nl/confluence/pages/viewpage.action?spaceKey=L2M&title=L2+STAT+Decision%3A+SC+-+SDP+OPC-UA+interface @@ -76,6 +78,25 @@ Conversely, to calculate the block index for an antenna pair ``(a,b)``, use:: def block_nr(a: int, b: int) -> int: return baseline_index(a // 12, b // 12) +Configuring the XSTs +````````````````````````````` + +The XSTs can be configured with several settings: + +.. note:: The XST processing needs to be toggled off and on using ``FPGA_xst_processing_enable_RW`` for new settings to become active on the station. + +:FPGA_xst_processing_enable_RW: Whether XSTs are computed on each FPGA. + + :type: ``bool[N_fpgas]`` + +:FPGA_xst_integration_interval_RW: The time interval to integrate over, per FPGA, in seconds. + + :type: ``float[N_fpgas]`` + +:FPGA_xst_subband_select_RW: The subband to cross correlate, per FPGA. Note: only the entries ``[x][1]`` should be set, the rest should be zero. + + :type: ``uint32[N_fpgas][8]`` + Subscribe to statistics streams --------------------------------- diff --git a/docs/source/faq.rst b/docs/source/faq.rst index 631c6fa3a3f17571970c2debd638c6c0bf5c7624..05022cd81032316038876a788d4bac0ea8e645c7 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -147,6 +147,17 @@ Let's see where the packets get stuck. Let us assume your MTU=9000 network inter - If still on error was found, you've likely hit a bug in our software. +Inspecting SST/XST packets +`````````````````````````````````````````````````````````````````````````````````````````````````````````````` + +The fields ``sst.last_packet_R`` and ``xst.last_packet_R`` contain a raw dump of the last received packet for that statistic. Parsing these packets is aided greatly by using our packet parser:: + + from tangostationcontrol.devices.sdp.statistics_packet import SSTPacket, XSTPacket + + # print the headers of the last received packets + print(SSTPacket(bytes(sst.last_packet_R)).header()) + print(XSTPacket(bytes(xst.last_packet_R)).header()) + Other containers -------------------------------------------------------------------------------------------------------------- diff --git a/tangostationcontrol/tangostationcontrol/common/lofar_logging.py b/tangostationcontrol/tangostationcontrol/common/lofar_logging.py index 673af8f959edbdc748545bdcf6f08388c3fa944b..f6c6457d2d002276b91e6115026f892b6cb22fdf 100644 --- a/tangostationcontrol/tangostationcontrol/common/lofar_logging.py +++ b/tangostationcontrol/tangostationcontrol/common/lofar_logging.py @@ -125,6 +125,9 @@ def configure_logger(logger: logging.Logger=None, log_extra=None, debug=False): # don't spam errors for git, as we use it in our log handler, which would result in an infinite loop logging.getLogger("git").setLevel(logging.ERROR) + # don't spam debug messages when fetching URLs + logging.getLogger("urllib3").setLevel(logging.INFO) + # for now, also log to stderr # Set up logging in a way that it can be understood by a human reader, be # easily grep'ed, be parsed with a couple of shell commands and