partitions_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 system partitions.

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 partitions_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 = "root_part:"#

The ‘CATEGORY’ macro defines the category name of this scope.

static str SCAN = "${SCAN_MACRO=10 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 ‘10 minute’ and can be re-defined in the ‘cmd’ file.

static str TARGET_PARTITION_PATH = "/"#

The ‘TARGET_PARTITION_PATH’ macro defines the path to the partition to monitor (in this scope).

This macro is used by the below shell instructions of this scope.

static str PV_NAME_SCALAR_1 = "partition_space_used"#

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 = "df -h ${TARGET_PARTITION_PATH} | awk '{print \\\\$5}' | tail -1 | tr -d '%%' | tr '-' '0'"#

This macro defines a shell instruction retrieving the pourcentage of used space in the target partition.

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 comment-macro is used to uncomment/load the ‘${PREFIX}${CATEGORY}${PV_NAME_SCALAR_1}’ ai record.

static str EGU_SCALAR_1 = "%"#

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 = "partition_inodes_used"#

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 = "df -i ${TARGET_PARTITION_PATH} | awk '{print \\\\$5}' | tail -1 | tr -d '%%' | tr '-' '0'"#

This macro defines a shell instruction retrieving the pourcentage of used inodes in the target partition.

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 = "%"#

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_2}.EGU` field.