2024-01-24 13:56:45 +00:00
|
|
|
# A Quick Start Guide
|
|
|
|
|
2024-01-24 15:35:47 +00:00
|
|
|
This guide provides instructions for running the SCX schedulers as a systemd service and checking its logs.
|
2024-01-24 13:56:45 +00:00
|
|
|
|
|
|
|
## Getting Started
|
2024-01-26 23:59:23 +00:00
|
|
|
|
|
|
|
At the very beginning, configure the /etc/default/scx file:
|
|
|
|
|
|
|
|
- in the SCX_SCHEDULER variable, select the scheduler you are interested in
|
|
|
|
|
|
|
|
- in the SCX_FLAGS variable, specify the flags you want to add. To do this, execute and read what flags you can add.
|
|
|
|
|
|
|
|
```
|
|
|
|
scx_SCHEDNAME --help
|
|
|
|
```
|
|
|
|
|
2024-01-24 13:56:45 +00:00
|
|
|
To start the SCX scheduler at boot, you need to run the systemd service as root. Here are the steps:
|
|
|
|
|
2024-01-26 23:59:23 +00:00
|
|
|
|
2024-01-24 13:56:45 +00:00
|
|
|
- Enable the service:
|
|
|
|
|
|
|
|
```
|
2024-01-26 23:59:23 +00:00
|
|
|
systemctl enable scx.service
|
2024-01-24 13:56:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
- Start the service:
|
|
|
|
|
|
|
|
```
|
2024-01-26 23:59:23 +00:00
|
|
|
systemctl start scx.service
|
2024-01-24 13:56:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Alternatively, you can use a shortened version of these commands:
|
|
|
|
|
|
|
|
```
|
2024-01-26 23:59:23 +00:00
|
|
|
systemctl enable --now scx.service
|
2024-01-24 13:56:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
- To check the status of the service, use the following command:
|
|
|
|
|
|
|
|
```
|
2024-01-26 23:59:23 +00:00
|
|
|
systemctl status scx.service
|
2024-01-24 13:56:45 +00:00
|
|
|
```
|
|
|
|
|
2024-06-14 18:22:36 +01:00
|
|
|
## Override global configuration
|
|
|
|
|
|
|
|
It is possible to override the global scx settings using systemd environment
|
|
|
|
variables `SCX_SCHEDULER_OVERRIDE` and `SCX_FLAGS_OVERRIDE`.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```
|
|
|
|
systemctl set-environment SCX_SCHEDULER_OVERRIDE=scx_rustland
|
|
|
|
systemctl set-environment SCX_FLAGS_OVERRIDE="-s 10000"
|
|
|
|
systemctl restart scx
|
|
|
|
```
|
|
|
|
|
2024-06-14 20:24:56 +01:00
|
|
|
If you want to restore the default value from the `/etc/default/scx` file execute:
|
|
|
|
|
|
|
|
```
|
|
|
|
systemctl unset-environment SCX_SCHEDULER_OVERRIDE
|
|
|
|
systemctl unset-environment SCX_FLAGS_OVERRIDE
|
|
|
|
systemctl restart scx
|
|
|
|
```
|
|
|
|
|
2024-01-24 13:56:45 +00:00
|
|
|
## Checking Journald Logs
|
|
|
|
|
2024-06-14 18:22:36 +01:00
|
|
|
The SCX schedulers do not log to the default journald namespace. Instead, they save logs in a dedicated ```sched-ext``` namespace.
|
2024-01-24 13:56:45 +00:00
|
|
|
This is where you should look for information about possible errors.
|
|
|
|
|
|
|
|
- To view the logs, use the following command:
|
|
|
|
|
|
|
|
```
|
|
|
|
journalctl --namespace=sched-ext
|
|
|
|
```
|
|
|
|
|
|
|
|
- To find logs from another system startup and identify when a potential error might have occurred, use:
|
|
|
|
|
|
|
|
```
|
|
|
|
journalctl --namespace=sched-ext --list-boots
|
|
|
|
```
|
|
|
|
|
|
|
|
- To verify the amount of space taken up by the logs, use:
|
|
|
|
|
|
|
|
```
|
|
|
|
journalctl --namespace=sched-ext --disk-usage
|
|
|
|
```
|
|
|
|
|