CLI Sensor Language¶
The cms_perf executable supports configuring each load sensor via the CLI.
This allows to parse mathematical expressions including the actual system sensors
to calculate the final reading.
# allow 10x load per core than usual
cms_perf --runq=100.0*loadq/10/ncores
Load Sensors¶
The cms_perf provides five sensor readings as percentages,
which can be customized individually.
By default, they express the canonical cms.perf readings:
--prunq=100.0*loadq/ncoresExpression to compute system load percentage [default: %(default)s]
--pcpu=pcpuExpression to compute cpu utilization percentage [default: %(default)s]
--pmem=pmemExpression to compute memory utilization percentage [default: %(default)s]
--ppag=0Expression to compute paging load percentage [default: %(default)s]
--pio=pioExpression to compute network utilization percentage [default: %(default)s]
Each canonical sensor reading is available in sensor expressions
with its canonical name.
For example, prunq always refers to the default definition of --prunq.
Sensor Expressions¶
Each sensor can be reconfigured by supplying an expression to compute it. Expressions use a simple language, which consists of
float operators
*,/,+,-and parentheses,function calls with and without arguments, and
constants such as numbers and enums.
Constant Literals¶
Number literals are decimals, with optional sign and fractional part.
For example, this includes 12, -1.2, and 12..
Enum literals are plain names, and only allowed in functions that expect them.
For example, ncores allows ncores(all) and ncores(physical),
but not ncores(inet6) nor ncores("all").
Functions Calls¶
Various functions are built-in for use in sensor expressions. Some of these are actual system sensors, collecting data from the system, others are helpers to transform data, such as taking the maximum of several data points. There are two ways to use functions in expressions: using just the bare name to invoke default arguments, or using the name followed by parenthesised arguments.
# allow 10x load per all cores than usual
cms_perf --runq=100.0*loadq/10/ncores
# allow 10x load per physical cores than usual
cms_perf --runq=100.0*loadq/10/ncores(physical)
Available Functions¶
loadqAbsolute system load, the number of active processes
max(a, b, others...)The maximum value of all arguments
min(a, b, others...)The minimum value of all arguments
ncoresorncores(kind)Number of CPU cores, by default including logical cores as well
kindselects which cores to count, and may one ofallorphysical. It defaults toall.nsocketsornsockets(kind)Number of open sockets across all processes
kindselects which sockets to count, and may be one ofinet,inet4,inet6,tcp,tcp4,tcp6,udp,udp4,udp6,unixorall. It defaults totcp.pcpuPercentage of cpu utilisation
pioPercentage of network I/O utilisation
pmemPercentage of memory utilisation
prunqPercentage of system load per core
xrd.nfdsNumber of file descriptors by all XRootD processes
xrd.nthreadsNumber of threads by all XRootD processes
xrd.piowaitPercentage of time waiting for IO by all XRootD processes