Coder Social home page Coder Social logo

cpulimit's Introduction

CpuLimit

An oxidized version of the original cpulimit, a utility to limit the CPU usage of a process.

Design

This crate implements user-space scheduling: after each time slice (currently 100 ms), cpulimit wakes up and parses the /proc/<pid>/stat file to check how long the target process ran. It then sends the SIGSTOP and SIGCONT signals to suspend and resume execution in order to obtain the desired CPU usage.

The project is divided into two Cargo workspace members:

  • cpulimiter - a library implementing the functionality
  • cpulimit - the executable

Limitations

  • only supports Linux-based operating systems.
  • only single-threaded processes are currently supported. Now supported.
  • the time slice is not configurable yet. Now you are able to configure it

License

Developed at TEHTRIS by Fabien Savy.

Distributed under the terms of the GNU Lesser General Public License (LGPL), Version 3.0 (the "License"). You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.txt.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

cpulimit's People

Contributors

shadow3aaa avatar ektehtris avatar

Stargazers

 avatar Mayuu酱重症患者 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.