Table des matières

Moodle Load Monitor (tool_moodleload)

Administration tool that exposes, through a web service, the system metrics of the host running Moodle (CPU, memory, load average). It is designed to correlate, during a load test, the measured HTTP response times with the actual consumption of the server. It also provides the Moodle-side entry point of the MoodleLoad load testing platform, which lets you prepare and drive tests on a dedicated instance.

Guides

Feature summary

Exposed measurements

Metric Source Remarks
CPU usage (%) /proc/stat, delta between two snapshots Value -1 on the first call: two calls spaced about 5 seconds apart are needed.
Total, available, used memory /proc/meminfo In bytes; -1 if unreadable.
Load average (1, 5, 15 min) sys_getloadavg() null on Windows.

The host system must be Linux, with a readable /proc file system, for the CPU and memory measurements.

Web service call

GET /webservice/rest/server.php
  ?wstoken=<TOKEN>
  &wsfunction=tool_moodleload_get_metrics
  &moodlewsrestformat=json

The token must never appear in a shared URL or in a document. It must be generated for the technical user moodleload or for a dedicated user, and revoked if needed in Site administration / Server / Web services / Manage tokens.

Technical sheet

Technical sheet
Component type Administration tool (admin/tool)
Name Moodle Load Monitor
Technical name tool_moodleload
Supported versions :M41: to :M53:
Distribution Moodle Marketplace
Availability Alpha (MATURITY_ALPHA): for test use, not intended for production
GDPR compliance Yes
Dependencies No plugin dependency. Web services and REST protocol enabled. PHP 8.1 or higher.

Builds

Note: a “Failing” status does not necessarily mean that the plugin does not work. This status reflects the result of automated tests checking the code against Moodle's strict standards. We are continuously working on bringing all supported plugins progressively into compliance with these development rules.

Branch Continuous integration tests
405 CI status
501 CI status

Credits

Developed by Valery Frémaux (ActiveProLearn) for the MoodleLoad tool on the Moogwai platform.


Back to plugins index - Back to catalogue index