zoukankan      html  css  js  c++  java
  • 安装CPULimit到Linux(源码)

    运行环境

    适用系统:所有Linux系统
    当前版本:无
    硬件要求:无

    安装过程

    1、安装依赖

    root@localhost:~# apt-get -y install git
    

    2、从GitHUB中克隆源码到本地

    root@localhost:~# git clone https://github.com/opsengine/cpulimit.git
    

    3、编译并安装

    root@localhost:~# cd cpulimit/src
    root@localhost:~/cpulimit/src# make
    root@localhost:~/cpulimit/src# cp cpulimit /usr/bin
    

    4、限制指定进程的CPU百分比

    下面演示的是将进程号为“11830”的进程的CPU限制在百分之200。

    root@localhost:~# nohup cpulimit --pid 11830 --limit 200 &
    
    乐在分享!~~
  • 相关阅读:
    调试与分析
    GCC
    汇编
    数据恢复
    TCP/IP
    shell
    vmstat、top
    计算程序运行时间的封装
    protobuf
    c++模板
  • 原文地址:https://www.cnblogs.com/network-ren/p/12376998.html
Copyright © 2011-2022 走看看