# SPDX-License-Identifier: GPL-2.0-only

# Database backend. Can be: sqlite3, postgresql, mysql
# RASDAEMON_DB_BACKEND=sqlite3

# Allow overriding hostname when using MySQL/MariaDB or PostgreSQL databases
# RASDAEMON_HOSTNAME=

# Comma- or whitespace-separated trace events to leave disabled. Each entry
# uses the exact group:event name, for example:
# DISABLE="ras:mc_event ras:aer_event"

# SQLite3 database backend connection parameters
# Full path to the database file. The compiled-in path is used when unset.
# RAS_SQLITE3_DATABASE="/var/lib/rasdaemon/ras-mc_event.db"

# PostgreSQL database backend connection parameters
# RAS_PG_HOST=""
# RAS_PG_PORT="5432"
# RAS_PG_USER="rasdaemon"
# RAS_PG_PASSWORD=""
# RAS_PG_DATABASE="rasdaemon"
# RAS_PG_SCHEMA="rasdaemon"
# Optional libpq sslmode (disable, allow, prefer, require, verify-ca,
# verify-full). Empty or false uses libpq's default (prefer).
# RAS_PG_SSL_MODE="prefer"
# Require TLS when RAS_PG_SSL_MODE is empty or false.
# RAS_PG_USE_SSL="false"
# RAS_PG_CONNECT_TIMEOUT="10"

# MySQL/MariaDB database backend connection parameters
# RAS_MYSQL_HOST=""
# RAS_MYSQL_PORT="3306"
# RAS_MYSQL_USER="rasdaemon"
# RAS_MYSQL_PASSWORD=""
# RAS_MYSQL_DATABASE="rasdaemon"
# RAS_MYSQL_SOCKET=""
# RAS_MYSQL_USE_SSL="false"
# RAS_MYSQL_CONNECT_TIMEOUT="10"

# Page Isolation
# NOTE: Runtime configuration reload is unsupported; restart the service after
# changing this file.
# NOTE: This file is installed below the configured sysconfdir.

# Specify the threshold of isolating buggy pages.
#
# Format:
#   [0-9]+[unit]
# Invalid values are replaced with the default.
#
# Supported units:
# PAGE_CE_REFRESH_CYCLE: D|d (day), H|h (hour), M|m (min), default is in hour
# PAGE_CE_THRESHOLD: K|k (x1000), M|m (x1000k), default is none
#
# These two settings are used only when PAGE_CE_ACTION is not "off".
PAGE_CE_REFRESH_CYCLE="24h"
PAGE_CE_THRESHOLD="50"

# Specify the threshold of isolating buggy memory rows.
#
# Format:
#   [0-9]+[unit]
# Invalid values are replaced with the default.
#
# Supported units:
# ROW_CE_REFRESH_CYCLE: D|d (day), H|h (hour), M|m (min), default is in hour
# ROW_CE_THRESHOLD: K|k (x1000), M|m (x1000k), default is none
#
# These two settings are used only when ROW_CE_ACTION is not "off".
ROW_CE_REFRESH_CYCLE="24h"
ROW_CE_THRESHOLD="50"

# Specify the rasdaemon action when a row error threshold is exceeded.
#
# off      no action
# account  only account errors
# soft     try to soft-offline row without killing any processes
#          This requires an up-to-date kernel and might not succeed.
# hard     try to hard-offline row by killing processes
#          This requires an up-to-date kernel and might not succeed.
# soft-then-hard   First try to soft offline, then try hard offlining.
# Note: default offline choice is "off".
ROW_CE_ACTION="off"

# Specify the rasdaemon action when a page error threshold is exceeded.
#
# off      no action
# account  only account errors
# soft     try to soft-offline page without killing any processes
#          This requires an up-to-date kernel and might not succeed.
# hard     try to hard-offline page by killing processes
#          This requires an up-to-date kernel and might not succeed.
# soft-then-hard   First try to soft offline, then try hard offlining.
# Note: default offline choice is "soft".
PAGE_CE_ACTION="soft"

# CPU Online Fault Isolation
# Whether to enable cpu online fault isolation (yes|no).
CPU_ISOLATION_ENABLE="no"
# Specify the threshold of CE numbers.
#
# Format:
#   [0-9]+[unit]
#
# Supported units:
# CPU_CE_THRESHOLD: no unit
# CPU_ISOLATION_CYCLE: D|d (day), H|h (hour), M|m (minute), S|s (second), default is in second
CPU_CE_THRESHOLD="18"
CPU_ISOLATION_CYCLE="24h"

# Prevent excessive isolation from causing an avalanche effect
CPU_ISOLATION_LIMIT="10"

# Event Trigger

# Event trigger will be executed when the specified event occurs.
#
# Execute triggers path
# For example: TRIGGER_DIR=/etc/ras/triggers
TRIGGER_DIR=

# Execute these triggers when the corresponding event occurs. A trigger is not
# executed when its variable is empty.
# For example:
#   MC_CE_TRIGGER=mc_event_trigger
#   MC_UE_TRIGGER=mc_event_trigger
MC_CE_TRIGGER=
MC_UE_TRIGGER=
AER_CE_TRIGGER=
AER_UE_TRIGGER=
MEM_FAIL_TRIGGER=

# CE Statistic Threshold
#
# Specify the threshold of CE per second.
MC_CE_STAT_THRESHOLD=2000

# Poison page statistics
#
# Supported units:
# POISON_STAT_THRESHOLD: kB
POISON_STAT_THRESHOLD=102400

ERST_DELETE=1
