LinuxCommandLibrary

cfscores

Display Codeforces contest scores and rankings

SYNOPSIS

cfscores [-h|-V] [--format FORMAT] [--no-legend] [path...]

PARAMETERS

-h, --help
    Print usage message and exit

-V, --version
    Print program version and exit

--format FORMAT
    Output format: table (default) or json

--no-legend
    Suppress legend/header line

DESCRIPTION

cfscores is a utility from the cgroup-tools package that displays current scores for SCX (Service Class eXecution) schedulers in Linux kernel 6.11+. SCX enables BPF programs to extend the scheduler for cloud workloads, assigning scores for load balancing and priority.

It reads scores from cgroup v2 hierarchies under the cpu controller, showing values like sum_exec_runtime, nr_periods, and scheduler-specific metrics. By default, it outputs a table for the entire hierarchy from root. Specify cgroup paths to limit scope.

Useful for monitoring in environments using schedulers like scx_bpfland, scx_lavd, or scx_rustland. JSON output aids scripting and analysis.

CAVEATS

Requires cgroup v2, cpu controller, and active SCX scheduler (e.g., boot with scx_bpfland). No output otherwise. Paths must be absolute cgroupfs mounts.

EXAMPLE

cfscores
Shows full hierarchy table.

cfscores --format json /sys/fs/cgroup/myservice
JSON output for specific cgroup.

FILES

Reads /sys/fs/cgroup/<path>/cpu.stat and SCX-specific files like scx_scores.

HISTORY

Added in cgroup-tools 0.2 (2024) with Linux 6.11 SCX support; developed by Meta Cgroup team for BPF-extensible scheduling.

SEE ALSO

cgget(1), cgtop(1), systemd-cgtop(8)

Copied to clipboard