#!/usr/bin/bash

# coding=utf-8
#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2023 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT

# Check that CpuAccounting is enabled
[[ -d "/sys/fs/cgroup/cpuacct/system.slice" ]] || exit 0

# Set cpu quota for lvestats-burstwatcher service
file="/sys/fs/cgroup/cpuacct/lvestats-burstwatcher.service/cpu.rt_runtime_us"
[[ -f "$file" ]] && echo 100000 > "$file"
