Skip to main content

Sensor for the XRootD cms.perf directive

Project description

Sensor for use in the XRootD cms.perf directive. Measures system load, as well as cpu, memory, and network utilization, to enable load-balancing in a cluster of multiple XRootD servers.

Installation and Usage

Use pip to install the sensor, then configure it using the cms.perf directive.

Installing the sensor

The sensor can be installed using the Python package manager:

python3 -m pip install cms_perf

Installing the sensor creates a cms_perf executable.

When installed for a non-standard Python, such as a venv, the module can be run directly by the respective python executable:

python3 -m cms-perf

Configuring xrootd

Add the script or module as the pgm executable of the cms.perf directive. Set the same interval for the directive’s int and the sensor’s --interval.

# installed for system python
cms.perf int 2m pgm /usr/local/bin/cms_perf --interval 2m
# installed for virtual environment
cms.perf int 2m pgm /path/to/venv/bin/python -m cms_perf --interval 2m

See the cms.perf documentation for details of the directive. Consult the sensor’s help via cms_perf --help for details of the sensor.

Testing cms.sched policies

To gauge how a server is rated by a manager cms, cms_perf allows to evaluate the total weight of the collected sensor data. Use the --sched option and pass a cms.sched directive that you want to test; in addition to the sensor data on stdout, the total weight is written to stderr.

$ python3 -m cms_perf --interval=1 --sched 'cms.sched runq 20 cpu 20 mem 60 maxload 45'
13 1 70 0 0 44
13 3 70 0 0 45!
13 1 70 0 0 44
13 1 70 0 0 44
13 2 70 0 0 45

If maxload is given, a ! indicates whether the load exceeds it. All unused options, including the cms.sched word, are ignored and may be omitted.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cms_perf-0.2.0.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

cms_perf-0.2.0-py2.py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page