how to start cpulimit at boot time ?

with 42.3 i put a statement “cpulimit …” in /etc/init.d/boot.local file

with leap 15 there is no more boot.local file

how to start cpulimit at boot time ?

thanks

Hi
You would need to create a systemd service down in /etc/systemd/system.


# /etc/systemd/system/cpulimit.service
#

[Unit]
Description=Run cpulimit for XXXXX

[Service]
Type=oneshot
ExecStart=/usr/bin/cpulimit <your options>

[Install]
WantedBy=multi-user.target

Then start the service, check, if all OK enable…


systemctl start cpulimit
systemctl status cpulimit
systemctl enable

Your question is not novel:
https://forums.opensuse.org/showthread.php/531768-Where-Art-Thou-Boot-Local

thanks

i need to launch 2 occurrences of cpulimit.

can we have 2 “execstart” statement in the service file ?

On Mon 27 Aug 2018 01:16:03 PM CDT, promeneur wrote:

thanks

i need to launch 2 occurrences of cpulimit.

can we have 2 “execstart” statement in the service file ?

Hi
Just create two service files, else use a && for the second one and see
how i goes, or create a script to run the two and point to that in the
service file, eg;


ExecStart=/bin/sh -c "/usr/sbin/my_cpulimit_script"


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.13-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

i created 2 services.

thanks to everybody