D
D
DimanCPlusPlus2021-06-11 10:38:15
linux
DimanCPlusPlus, 2021-06-11 10:38:15

How to set the script to autoload?

This is the command the script should execute: sudo cpupower frequency-set -g performance
Please help)
Fedora 34

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Yuriev, 2021-06-11
@DimanCPlusPlus

a universal script for autostarting a command when the system starts in Linux, regardless of the distribution, as long as the cron is standing, which is in the vast majority of systems:
sudo crontab -u root -e
and add the command

@reboot sleep 30 && cpupower frequency-set -g performance

read as
@reboot- after reboot
sleep 30- wait 30 seconds
cpupower frequency-set -g performance- execute the command for
30 seconds - optional, but sometimes it helps when system services at startup can perform an operation that nullifies your actions, or vice versa - if your team needs some kind of service that has not yet started
regarding your particular task - install kernel-tools
and configure
echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils

without any crons
Disclaimer: I don't know much about rpm-systems, maybe something else needs to be disabled

V
Valdemar Smorman, 2021-06-11
@smorman

Via Supervisor well.
Through Systemd it is even better, although I like Supervisor more - in my opinion it is more flexible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question