Get Processor Health Data

Is there a way to read the processor memory usage details either thru codesys or the API?

Just for general health monitoring, I like to monitor the processor usage and memory usage via SCADA. I was able to get processor usage via codesys (using the CmpSchedule.SchedGetProcessorLoad Function).

I have not been able to get memory details. I’ve tried a couple options:

  1. Calling SysMem.SysMemGetCurrentHeapSize returns a “Not Supported” error code in codesys.

  2. The linux core has a file “/proc/meminfo” which contains this data, but I get operation denied when trying to read it in codesys (it looks like read permissions are good).

If there is another way to get this information, I would be interested. Thanks!

I am unsure if there is read access to much of the internal topics of the linux OS via Codesys.

If you want to get that information in, I would recommend going through Node Red and then using the OPC-UA Node to get the information into tags in Codesys.

1 Like

Doing some more digging internally. With SSH access(via the free GROOV-LIC-SHELL, you can go in and add:
sudo ln -s /proc/meminfo /home/codesys/unsecured/meminfo

Then you should be able to access more information:

2 Likes