1

I am running some python scripts in my linux terminal that happen to be pretty resource intensive, but when I do my system will become pretty non-responsive until the process has completed. I know there are commands like nice and cpulimit but I haven't found a great way to just open a terminal that is somehow resource limited (and what percentage of resources can be devoted to it) and can be used to run any scripts during that particular session.

So is there a good way to do this?

5
  • Possible duplicate of Python - Limit cpu usage for a script Commented Feb 7, 2017 at 19:30
  • @DenisOlehov I did see this post, but it was a bit sparse the details of how to actually address my issue. Commented Feb 7, 2017 at 19:36
  • have you opened a documentation? docs.python.org/2/library/resource.html#resource.setrlimit Commented Feb 7, 2017 at 19:42
  • @DenisOlehov I don't know how useful those would be to this question. The problem is probably CPU related and the only thing CPU related in the resource module is CPU time usage which I don't think Nightman is looking for. The others are concerned with various memory usage levels. Commented Feb 7, 2017 at 21:05
  • there is a method called .setrlimit() :/ Commented Feb 7, 2017 at 21:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.