Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > System > Hardware

    cpulimit 1.7

    Download button

    Downloads: 1,790  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.7/5)
    17 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    marlonx80 | More programs
    GPL / FREE
    June 7th, 2012, 07:23 GMT [view history]
    ROOT / System / Hardware

     Read user reviews (0)  Refer to a friend  Subscribe

    cpulimit description

    cpulimit is a simple program that attempts to limit the cpu usage of a process (expressed in percentage, not in cpu time).

    cpulimit is a simple program that attempts to limit the cpu usage of a process (expressed in percentage, not in cpu time). This is useful to control batch jobs, when you don't want they eat too much cpu.

    cpulimit project does not act on the nice value or other scheduling priority stuff, but on the real cpu usage. Also, it is able to adapt itself to the overall system load, dynamically and quickly.

    Requirements:

    · cpulimit should run on every Linux 2.2 or greater. It has been reported by several users that cpulimit works fine even on SMP hardware, but there is a little difference in the meaning of cpu usage (see below).
    · If you can modify the source code of cpulimit to make it run in a non Linux OS, please notify me, so I can publish your code. I think that the only non-portable code is iterating through the process list.

    Instructions:

    Download source from here (under GPL license), extract the source and compile:

    $ tar zxf cpulimit-1.0.tar.gz
    $ cd cpulimit-1.0
    $ make

    Executable file name is cpulimit.

    Examples of use:

    Limiting the program 'bigloop' by executable name to 40% CPU:

    $ ./cpulimit --exe bigloop --limit 40

    or

    $ ./cpulimit --path /usr/local/bin/bigloop --limit 40

    Limiting a program by PID to 55% CPU:

    $ ./cpulimit --pid 2960 --limit 55

    Usage: cpulimit TARGET [OPTIONS...]

    TARGET must be exactly one of these:

    -p, --pid=N pid of the process
    -e, --exe=FILE name of the executable program file
    -P, --path=PATH absolute path name of the executable program file

    OPTIONS

    -l, --limit=N percentage of cpu allowed from 0 to 100 (mandatory)
    -v, --verbose show control statistics
    -z, --lazy exit if there is no suitable target process, or if it dies
    -h, --help display this help and exit

    Notes:

    If you have just one processor you can limit the percentage from 0% to 100%, and this is fine. But if your machine has four processors percentage may vary from 0% to 400%, so setting the limit to 200% means to use no more than half of the available power.

    cpulimit should run at least with the same user running the controlled process. But it is much better if you run cpulimit as root, for precision issues.

    Actually, cpulimit does not limit the children (neither processes nor threads) of the original process. I know that it is a big limitation. I'm working to add this feature, though it isn't a trivial task.

    Product's homepage

    What's New in This Release: [ read full changelog ]

    · CPUlimit can now handle limiting CPU usage on multi-core systems, giving the user the option to set limits above 100%.
    · Error checking is now in place to avoid memory errors if CPUlimit cannot read the proc file system.

      


    TAGS:

    limit cpu usage | limit process | batch jobs | cpulimit | limit | cpu

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM