System variables and status information
107708_en_08 PHOENIX CONTACT 69 / 112
8.7 Partition
The USER_PARTITION system variable is organized as data structure. The
USER_PARTITION system variable can be used to retrieve various information and mem-
ory statistics about the user partition (overlay file systems). The partition can be located on
an external SD card or on the internal memory. This memory is organized in blocks. A block
has a constant, fixed size and a file always occupies one or more blocks.
A certain number of blocks is reserved in the Linux system for the root user. These reserved
blocks are only available for the root user and ensure that the root user is able to act even if
the memory is occupied (e.g. for log output).
Tabelle 8-5 USER_PARTITION system variable (PARTITION_INFO data structure) and the system variables it con-
tains
System variable Ty pe Description
USER_PARTITION PARTITION_INFO Data structure
MEM_TOTAL ULINT Total memory of the partition in bytes
(including reserved blocks)
MEM_FREE ULINT Free, available memory in bytes
(without reserved blocks)
MEM_USED ULINT Occupied memory in bytes
(including reserved blocks)
MEM_USAGE USINT Used memory in %
(without reserved blocks)