How to limit shell script as root with LVE settings? (Limit root script by cpu and disk io?)
  1. Forums
  2. General
  3. Programming for CloudLinux
  1. Host Provider
  2. Thursday, 01 October 2020
  3.  Subscribe via email
How can I run a shell script as root so that the script is limited by LVE?

For example, I have a shell script that runs every day with cron. It is very cpu and io intensive and I want to "limit" the script to use a maximum of 1 cpu and 5MB/s disk io.

Is this possible?
Rate this post:
  1. 01.10.2020 10:10:34
  2. # 1
Sergey Khristich Accepted Answer
Posts: 504
Joined: 20.05.2019
Thank you for reaching out! You can make your custom lve and add a process to it with lve_suwrapper

lvectl set 10000 --speed=100% --io 5000 --iops 5000 --mem 4G
lve_suwrapper 10000 /script
lveinfo --id 10000

This information in our documentation will be useful here
If you have any other questions, feel free to ask here. Thank you for contacting us.
Marketing Manager
  • Page :
  • 1

There are no replies made for this post yet.
Be one of the first to reply to this post!
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.

EU e-Privacy Directive

We use cookies to ensure you get the best experience using our website and services. Read more about it in our Privacy Policy. Please agree to the use of cookies to proceed. Alternatively, you may disable cookies in your browser at any time.

You have declined cookies. This decision can be reversed.

You have allowed cookies to be placed on your computer. This decision can be reversed.