Table des matières

Moodle Load Monitor: user guide

This guide presents the two operating screens of tool_moodleload: the server metrics dashboard, which lets you monitor the machine during a test, and the MoodleLoad engine status view, which shows the test engine, its injectors and the scheduled jobs. It also explains how to limit the allowed tests.

Accessing the screens

Screen Address Required right
Metrics dashboard /admin/tool/moodleload/index.php Capability tool/moodleload:readmetrics (Manager role by default)
Engine status view Site administration / Development / MoodleLoad load tester: engine and injector status Site administrator only
Settings Site administration / Plugins / Administration tools / Moodle Load Monitor settings Site administrator

:!: The dashboard has no entry in Moodle's administration menu. Open it by its address or bookmark it. The status view is reserved for administrators, whatever capabilities are assigned.

Metrics dashboard

The dashboard shows the state of the machine that hosts the tested site: it is the server-side counterpart of the response time measurements made by MoodleLoad. Keep it open in a tab during a test.

The cards

Card Content Colour code
CPU usage CPU usage percentage since the last refresh. Green up to 50%, orange above 50%, red above 80%.
Memory Percentage of memory used, with the memory used and the total memory. Green up to 70%, orange above 70%, red above 90%.
Load System load average over 1, 5 and 15 minutes. No threshold: the value to compare is the number of server cores.
Processes Total number of processes, including those running and those blocked on I/O. None.

Reading the values: a dash (—) means the measurement is not available. A load average that stays above the number of cores indicates a saturated server.

The network table

One line per network interface: received rate and sent rate (in bytes per second), totals received and sent since the server started, receive and send errors. A non-zero error is displayed in red. The rates are calculated between two refreshes: they therefore appear from the second reading.

Refresh

The page updates by itself, without reloading. The interval is the CPU measurement cache lifetime of the setting (5 seconds by default); it is recalled at the top of the page. The time of the last reading is displayed at the bottom. If a refresh fails (loss of session, overloaded server), the last values stay displayed and the page retries on the next round, without a message. If the time of the last reading no longer advances, reload the page.

A yellow alert at the top of the page signals that a measurement could not be collected. The usual message says that the /proc file system is not available: the host is not Linux, or the machine is a container that does not expose /proc. The CPU and memory cards are then empty.

Usage tips

MoodleLoad engine status view

This view queries the MoodleLoad front end and shows what it knows about the test engine, its injectors and the token owner's jobs. It requires the front end URL and the token to be filled in the settings; otherwise, the page says the configuration is incomplete.

The two queries are independent: the failure of one does not prevent the other from being displayed.

The engine

Information Meaning
State Running, Stopping, Stopped or Unreachable.
Version, listening address, port Identity of the engine process.
Running since Start date.
Jobs running / stopped Number of active and finished jobs.
Messages processed, failed requests Engine activity counters.
Registered futures Pending asynchronous tasks.
Engine message Free information passed by the engine.

The injectors

An injector is a machine that generates the load. The table gives, for each: the host, the owner, the state (Active, Disabled or Unreachable), the maximum number of threads, the free slots, the sessions in progress, the response time and a message. A total summarises the number of declared, enabled and active injectors. The free slots are displayed with a colour code (green, orange, red) according to the share of available slots.

If no injector is active, the view says so: no load session can start. Re-enable or restart an injector on the platform before launching a test.

My jobs

The list of the token owner's jobs: campaigns, mixes, scenarios and tests. Child jobs are placed under their parent. For each job: name, type, target site, status (Installed, Pending, Scheduled, Queued), user, size, creation and planned start dates. Counters summarise the number of campaigns, mixes, tests and target sites. The list is limited to 500 jobs; a message says so when it is truncated.

Opening the test platform

A link at the bottom of the view, Open the MoodleLoad test platform, opens the platform in a new tab, already logged in with the account of this site's owner. The link is single-use and valid for two minutes. It only works if the MoodleLoad front end has ticket authentication enabled and if the service account has the right to log in as the site owner. The plugin only follows the received address if it points to the configured front end host.

Limiting the allowed tests

In the settings, the Load test authorisation section acts as a safety switch, checked at each test start and at each periodic check:

Outside the time ranges, or if tests are forbidden, the engine receives a refusal message during the service negotiation. See the web service.

Common problems

Symptom Probable cause
Access denied to the dashboard The account does not have the tool/moodleload:readmetrics capability.
CPU and memory cards empty, yellow alert /proc unavailable (non-Linux host or restricted container).
Frozen values Session expired or server overloaded: reload the page.
Status view: incomplete configuration Front end URL or token not filled in the settings.
Status view: HTTP 401 error Front end HTTP authentication: user, password or method.
Status view: token refused Token of the wrong front end service (use Moodle Load Monitoring API).
Link to the platform has no effect Ticket authentication not enabled on the front end, or login right missing for the service account.

Back to the component index - Back to plugins index - Back to catalogue