processors_monitoring.substitutions

Contents

processors_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 processors.

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 processors_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 = "procs:"#

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

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 = "lscpu | grep '^CPU\\(s\\):' | awk '{print \\\\$2}'"#

This macro defines a shell instruction retrieving the number of CPUs.

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 PV_NAME_SCALAR_2 = "threads_per_core"#

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 = "lscpu | grep '^Thread\\(s\\) per core:' | awk '{print \\\\$4}'"#

This macro defines a shell instruction retrieving the number of threads per core.

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 PV_NAME_SCALAR_3 = "cores_per_socket"#

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 = "lscpu | grep '^Core\\(s\\) per socket:' | awk '{print \\\\$4}'"#

This macro defines a shell instruction retrieving the number of cores per socket.

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 PV_NAME_SCALAR_4 = "sockets_number"#

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 = "lscpu | grep '^Socket\\(s\\):' | awk '{print \\\\$2}'"#

This macro defines a shell instruction retrieving the number of sockets.

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 PV_NAME_SCALAR_5 = "last_15_minutes_processors_load"#

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 = "uptime | rev | awk '{print \\\\$1}' | rev | tr -d ','"#

This macro defines a shell instruction retrieving the processors load for the past 15 minutes.

static str PREC_SCALAR_5 = "2"#

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 PV_NAME_SCALAR_6 = "last_5_minutes_processors_load"#

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 = "uptime | rev | awk '{print \\\\$2}' | rev | tr -d ','"#

This macro defines a shell instruction retrieving the processors load for the past 5 minutes.

static str PREC_SCALAR_6 = "2"#

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 PV_NAME_SCALAR_7 = "last_1_minute_processors_load"#

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 = "uptime | rev | awk '{print \\\\$3}' | rev | tr -d ','"#

This macro defines a shell instruction retrieving the processors load for the past 1 minute.

static str PREC_SCALAR_7 = "2"#

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.