Skip to content

Monitor the controller from a panel ​

When a line slows down or a model stops loading, the first question is whether the controller is running out of something. The system monitor widget answers it on a panel: processor, memory, disk, network, graphics card and the busiest processes, refreshed every second. In this guide you add it to a page of the panel of a biscuit line and read it while the line is running.

What you will learn

  • How to add the system monitor to a panel
  • What each part of it tells you
  • How to see the load that a model puts on the graphics card

Before you start

You need a panel page with a group for the monitor; here the page «Biscuit line» with an empty group «Controller», 12 columns wide. Pages and groups are explained in Show inspection results on a panel. The flow also streams packs of biscuits through a model, as in Decide pass or fail from the predictions, to give the controller some work.

1. Add a system monitor ​

Type ui-system-monitor in «filter nodes» and drag the «system-monitor» node, in the «dashboard» category, onto the workspace. It has no input and no output: it reads the state of the controller by itself and draws it on the panel.

Add a system monitor

2. Choose its group and refresh rate ​

Double-click the node and choose the group, here «Controller». Leave «Size» on auto to give it the whole width of the group, which it needs. «Update interval (ms)» is how often it reads the controller: 1000 is once a second, and 250 is the fastest it goes.

Choose its group and refresh rate

3. Deploy and start the line ​

Click «Done» and «Deploy». Press the «start» inject node: the packs go through the model one after another, so that the monitor has something to show.

4. Read the processor and the memory ​

Open «Panels». The first part shows the use of each core of the processor and the average (AVG), the number of tasks and threads, the load average of the last 1, 5 and 15 minutes, and how long the controller has been running. «MEMORY» shows the RAM and the swap in use. A RAM always close to full, or a swap that keeps growing, means the controller needs fewer models loaded or more memory.

Read the processor and the memory

5. Read the network and the disk ​

«NETWORK» lists each network connection with its state, its speed and the data going down and up. «DISK» lists where each disk is mounted, how full it is, and what is read and written each second. Node-RED runs in a container on the controller, so the list also shows every folder and file the container borrows from the controller: they share one disk, and /opt/storage, where images and models are kept, is the line to watch.

Read the network and the disk

6. Watch the graphics card ​

Scroll down to «GPU». For each NVIDIA graphics card it shows how busy it is (UTILIZATION), how much of its memory is taken (VRAM), its temperature, power and fan, and the processes that hold its memory, when the controller lets it see them. A model that is loaded keeps its share of the VRAM while it waits for images, and the use rises each time a pack goes through: look here before loading one more model.

Watch the graphics card

7. Find the busiest processes ​

The table next to it lists the processes that use the most, as htop would: memory (VIRT, RES, SHR), processor (CPU), state (TYPE) and command. Click a column title to sort by it, here RES for memory and CPU again. Node-RED runs in a container, so the table shows the processes of the container, with Node-RED itself at the top.

Find the busiest processes

Good to know ​

  • Who sees it. The monitor shows the controller the panel runs on, to everyone who opens the page. Put it on a page of its own, for maintenance, rather than on the operators' screen.
  • Without a graphics card. The «GPU» part is left out when the controller has no NVIDIA card or nvidia-smi cannot run.
  • The cost. Reading the controller every second costs very little; an interval of 250 ms, the fastest, is only worth it while you look for a short peak.
  • More detail. «Controller» in the top bar of the platform opens the tools of the controller, with its logs and its services: see Open the tools of a controller.

Next steps ​

Recorded on Rosepetal release 1.8.15, Node-RED 5.0.10.