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
Built Distribution
File details
Details for the file cms_perf-0.2.0.tar.gz
.
File metadata
- Download URL: cms_perf-0.2.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66dc8f1bee615787c039499ea33f2b549d3a414d3af6e469dee0ff1e542bc1b8 |
|
MD5 | d2988444e9857c6b282d50b72ccdd4ab |
|
BLAKE2b-256 | d6374fb0ecbab65e1acb311074723f2fae6267520de6ca61a4e3800dc822100d |
File details
Details for the file cms_perf-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: cms_perf-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 625876e201f137a6a06e153288a24bf61050fa777d519ff55645fba47745a505 |
|
MD5 | e5164855da1e52719c2c85d5fa21c056 |
|
BLAKE2b-256 | 0e4c1623d232eda2d905601e7c16ae142a82de1716b79e5d09c3bf2b3469384b |