memory_monitoring.substitutions#
Note
Click here to check the source code of this file.
This file is a substitutions file implementing ssh_monitor_core.template in order to monitor the system memory (RAM).
In particular, this substitutions file implements ssh_monitor_core.template one time in a dedicated scope (‘scope1’).
Note that in the Doxygen documentation, a scope is interpreted as a class, and an EPICS macro substitution is interpreted either by a global variable or by a class attribute.
-
namespace memory_monitoring#
Variables
-
str PREFIX = "${PREFIX_MACRO}"#
The ‘PREFIX’ macro prefixes all the PVs names of this ‘.substitutions’ file.
This macro is set to the ‘PREFIX_MACRO’ macro, which has to be defined in the ‘.cmd’ file.
-
str SSH_OPTS_AND_ARGS = "${SSH_OPTS_AND_ARGS_MACRO}"#
The ‘SSH_OPTS_AND_ARGS’ macro defines the SSH options and arguments used for all the SSH commands (including associated shell instructions) of this ‘.substitutions’ file.
This macro is set to the ‘SSH_OPTS_AND_ARGS_MACRO’ macro, which has to be defined in the ‘.cmd’ file.
-
class scope1#
Public Static Attributes
-
static str CATEGORY = "mem:"#
The ‘CATEGORY’ macro defines the category name of this scope.
-
static str SCAN = "${SCAN_MACRO=1 minute}"#
The ‘SCAN’ macro defines how often the commands of this scope should be triggered.
This macro is set to the ‘SCAN_MACRO’ macro, which defaults to ‘1 minute’ and can be re-defined in the ‘cmd’ file.
-
static str PV_NAME_SCALAR_1 = "total_ram"#
This macro defines the PV name, note that this PV name is composed like so: ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}’.
-
static str SCALAR_1_INSTRUCTION = "free -m | grep 'Mem:' | awk '{print \\\\$2}'"#
This macro defines a shell instruction retrieving the total RAM.
-
static str PREC_SCALAR_1 = "0"#
This macro specifies the floating point precision (i.e.
the number of digits to show after decimal point) with which to display the value of the associated scalar instruction.
-
static str LOAD_SCALAR_1 = ""#
This macro uncomments the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}’ ai record.
-
static str EGU_SCALAR_1 = "MiB"#
This macro specifies the engineering unit of the associated scalar instruction.
-
static str LOAD_EGU_SCALAR_1 = ""#
This comment-macro is used to uncomment/load the previous ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}.EGU` field.
-
static str PV_NAME_SCALAR_2 = "used_ram"#
This macro defines the PV name, note that this PV name is composed like so: ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_2}’.
-
static str SCALAR_2_INSTRUCTION = "free -m | grep 'Mem:' | awk '{print \\\\$3}'"#
This macro defines a shell instruction retrieving the used RAM.
-
static str PREC_SCALAR_2 = "0"#
This macro specifies the floating point precision (i.e.
the number of digits to show after decimal point) with which to display the value of the associated scalar instruction.
-
static str LOAD_SCALAR_2 = ""#
This macro uncomments the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_2}’ ai record.
-
static str EGU_SCALAR_2 = "MiB"#
This macro specifies the engineering unit of the associated scalar instruction.
-
static str LOAD_EGU_SCALAR_2 = ""#
This comment-macro is used to uncomment/load the previous ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}.EGU` field.
-
static str PV_NAME_SCALAR_3 = "free_ram"#
This macro defines the PV name, note that this PV name is composed like so: ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_3}’.
-
static str SCALAR_3_INSTRUCTION = "free -m | grep 'Mem:' | awk '{print \\\\$4}'"#
This macro defines a shell instruction retrieving the free RAM.
-
static str PREC_SCALAR_3 = "0"#
This macro specifies the floating point precision (i.e.
the number of digits to show after decimal point) with which to display the value of the associated scalar instruction.
-
static str LOAD_SCALAR_3 = ""#
This macro uncomments the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_3}’ ai record.
-
static str EGU_SCALAR_3 = "MiB"#
This macro specifies the engineering unit of the associated scalar instruction.
-
static str LOAD_EGU_SCALAR_3 = ""#
This comment-macro is used to uncomment/load the previous ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}.EGU` field.
-
static str PV_NAME_SCALAR_4 = "shared_ram"#
This macro defines the PV name, note that this PV name is composed like so: ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_4}’.
-
static str SCALAR_4_INSTRUCTION = "free -m | grep 'Mem:' | awk '{print \\\\$5}'"#
This macro defines a shell instruction retrieving the shared RAM.
-
static str PREC_SCALAR_4 = "0"#
This macro specifies the floating point precision (i.e.
the number of digits to show after decimal point) with which to display the value of the associated scalar instruction.
-
static str LOAD_SCALAR_4 = ""#
This macro uncomments the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_4}’ ai record.
-
static str EGU_SCALAR_4 = "MiB"#
This macro specifies the engineering unit of the associated scalar instruction.
-
static str LOAD_EGU_SCALAR_4 = ""#
This comment-macro is used to uncomment/load the previous ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}.EGU` field.
-
static str PV_NAME_SCALAR_5 = "buffer_and_cache_ram"#
This macro defines the PV name, note that this PV name is composed like so: ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_5}’.
-
static str SCALAR_5_INSTRUCTION = "free -m | grep 'Mem:' | awk '{print \\\\$6}'"#
This macro defines a shell instruction retrieving the RAM from buffers and cache.
-
static str PREC_SCALAR_5 = "0"#
This macro specifies the floating point precision (i.e.
the number of digits to show after decimal point) with which to display the value of the associated scalar instruction.
-
static str LOAD_SCALAR_5 = ""#
This macro uncomments the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_5}’ ai record.
-
static str EGU_SCALAR_5 = "MiB"#
This macro specifies the engineering unit of the associated scalar instruction.
-
static str LOAD_EGU_SCALAR_5 = ""#
This comment-macro is used to uncomment/load the previous ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}.EGU` field.
-
static str PV_NAME_SCALAR_6 = "available_ram"#
This macro defines the PV name, note that this PV name is composed like so: ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_6}’.
-
static str SCALAR_6_INSTRUCTION = "free -m | grep 'Mem:' | awk '{print \\\\$7}'"#
This macro defines a shell instruction retrieving the available RAM.
-
static str PREC_SCALAR_6 = "0"#
This macro specifies the floating point precision (i.e.
the number of digits to show after decimal point) with which to display the value of the associated scalar instruction.
-
static str LOAD_SCALAR_6 = ""#
This macro uncomments the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_6}’ ai record.
-
static str EGU_SCALAR_6 = "MiB"#
This macro specifies the engineering unit of the associated scalar instruction.
-
static str LOAD_EGU_SCALAR_6 = ""#
This comment-macro is used to uncomment/load the previous ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}.EGU` field.
-
static str PV_NAME_SCALAR_7 = "total_swap"#
This macro defines the PV name, note that this PV name is composed like so: ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_7}’.
-
static str SCALAR_7_INSTRUCTION = "free -m | grep 'Swap:' | awk '{print \\\\$2}'"#
This macro defines a shell instruction retrieving the total SWAP.
-
static str PREC_SCALAR_7 = "0"#
This macro specifies the floating point precision (i.e.
the number of digits to show after decimal point) with which to display the value of the associated scalar instruction.
-
static str LOAD_SCALAR_7 = ""#
This macro uncomments the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_7}’ ai record.
-
static str EGU_SCALAR_7 = "MiB"#
This macro specifies the engineering unit of the associated scalar instruction.
-
static str LOAD_EGU_SCALAR_7 = ""#
This comment-macro is used to uncomment/load the previous ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}.EGU` field.
-
static str PV_NAME_SCALAR_8 = "used_swap"#
This macro defines the PV name, note that this PV name is composed like so: ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_8}’.
-
static str SCALAR_8_INSTRUCTION = "free -m | grep 'Swap:' | awk '{print \\\\$3}'"#
This macro defines a shell instruction retrieving the used SWAP.
-
static str PREC_SCALAR_8 = "0"#
This macro specifies the floating point precision (i.e.
the number of digits to show after decimal point) with which to display the value of the associated scalar instruction.
-
static str LOAD_SCALAR_8 = ""#
This macro uncomments the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_8}’ ai record.
-
static str EGU_SCALAR_8 = "MiB"#
This macro specifies the engineering unit of the associated scalar instruction.
-
static str LOAD_EGU_SCALAR_8 = ""#
This comment-macro is used to uncomment/load the previous ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}.EGU` field.
-
static str PV_NAME_SCALAR_9 = "free_swap"#
This macro defines the PV name, note that this PV name is composed like so: ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_9}’.
-
static str SCALAR_9_INSTRUCTION = "free -m | grep 'Swap:' | awk '{print \\\\$4}'"#
This macro defines a shell instruction retrieving the free SWAP.
-
static str PREC_SCALAR_9 = "0"#
This macro specifies the floating point precision (i.e.
the number of digits to show after decimal point) with which to display the value of the associated scalar instruction.
-
static str LOAD_SCALAR_9 = ""#
This macro uncomments the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_9}’ ai record.
-
static str EGU_SCALAR_9 = "MiB"#
This macro specifies the engineering unit of the associated scalar instruction.
-
static str LOAD_EGU_SCALAR_9 = ""#
This comment-macro is used to uncomment/load the previous ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}.EGU` field.
-
static str CATEGORY = "mem:"#
-
str PREFIX = "${PREFIX_MACRO}"#