About | Download | News | Contact |
May 15, 2024: Version 3.1 of LimitCPU has been launched. The new version fixes an issue with monitoring a target process which has multiple children and a low CPU limit throttle. In some cases this situation could lead to LimitCPU crashing. This has been fixed and the monitoring of children processes has been made slightly more efficient. April 4, 2023: A new version, 3.0, has been released which fixes an important bug in LimitCPU when the program is monitoring both a program and its child processes via the "-m" flag. In the past, it was possible LimitCPU would fail to spawn new instances to monitor child processes if LimitCPU was not in the user's default path. In other words, if we were launched from /usr/local/bin and this directory was not in the default path, then child processes might not be monitored. And the failure would happen silently. Now LimitCPU will try to do a better job of launching new monitors for child processes and it will print a warning about any errors when run in verbose mode. March 10, 2023: This new version contains no new functionality or changes in features. It changes the internal type for tracking and counting CPU cycles. Basically we've changed from an "int" type to a "long" in order to track long-running processes without running into numbers that overflow and cause problems. November 11, 2022: This new version, 2.9, makes the output when child processes are caught slightly less verbose, unless the "--verbose" flag is specified. Also cleans up the Makefile a little. May 5, 2021: The new 2.7 version addresses two minor issues which in unusual circumstances, such as unusually long/large PID values, could cause a buffer overflow. April 7, 2019: The new 2.6 release is a minor release that updates the Makefile to use GNU tar's newer syntax and fixes some code formatting to avoid compiler warnings. Also updated the manual page to warn against using this program on script files as that can overwhelm the system. March 27, 2017: The 2.5 release is a minor one and introduces just one change. When the multi-process feature is used to limit the CPU usage of child processes, it can cause a fork bomb when a parent of LimitCPU is used as the target. The new 2.5 release attempts to avoid some situations where a fork bomb could happen. November 24, 2016: The new 2.4 release offers a new feature, the ability to monitor both a target process and that process's child processes. This feature throttles each new process forked from the target and applies the same rules to the new processes. The new feature is currently available only on Linux and can be activated using the "--monitor-forks" flag. The following example monitors Firefox and any processes Firefox might create: cpulimit -l 25 --monitor-forks -- firefox August 30, 2016: A new release, version 2.3, introduces two new changes. First, the manual page has been updated to fix typos. Second, we have introduced a new command line parameter, --foreground (-f). The foreground flag indicates LimitCPU should remain running in the foreground while the target process is monitored. LimitCPU remains in the foreground, blocking, until the target process finishes. This may be useful in scripts where we want to launch and monitor a process and then quit when the target process is through. For example: cpulimit -l 25 --foreground logrotateIn additional, there has been some code clean-up. This does not change performance at all, but it removes some old, unused code we did not need. May 25, 2014: By default, when LimitCPU exits, it sends any watched process the continue signal (SIGCONT). This insures the watched process keeps working after LimitCPU is terminated. It is now possible to send a specific signal to a watched process when LimitCPU is terminated. This means the user can specify whether the watched process continues to run, is terminated or paused. Signals can be specified using the -s or --signal command line parameter. See the README and manual pages for examples. June 11, 2013: We have released a minor update to the LimitCPU program. This version contains some minor code clean-up and introduces two new features. Sometimes when a process gets out of control and gobbles up additional CPU cycles we don't merely want to throttle it, but actually terminate the process. LimitCPU now allows us to kill processes which go above their allotted CPU usage by using the "-k" command line flag. The second feature compliments the terminate feature. Once a process has been killed using the -k flag it is possible to re-start the process fresh using the "-r" command line flag. For example, if we have a daemon which we know is likely to run into an infinite loop and we wish to terminate and then re-start the daemon we can use the command cpulimit -l 10 -b -k -r my-daemonThe above command launches the my-daemon program and limits its CPU usage to 10%. Should the command use additional resources it is terminated and then my-daemon is run again. September 15, 2012: We are happy to report version 1.8 of LimitCPU is available for downloading. This release provides a few bug fixes and brings in patches from downstream projects. Changes include
June 6, 2012: Version 1.7 of LimitCPU is now available. This new release introduces a number of new features, including
May 5, 2012: Version 1.6 is now available. This release clears out some un-needed files, updates the copyright notice and should fix compiling LimitCPU on GNU/Hurd machines. February 21, 2012: Version 1.5 of LimitCPU is now available for download. This release updates the document and adds a new example for running LimitCPU from scripts. The Makefile has also been updated to use the default compiler on the system, with the option of falling back on GCC if no default is provided. The latest source code and updated README file can be found on our download page. August 12, 2011: We've made a few small changes to LimitCPU. Sanity checks have been put into place so we can handle situations where we cannot open entries in the proc file system. The CPU limit can now be higher than 100%, useful for multi-core machines. And a few checks have been put into the makefile to insure the program installs properly. The latest version, 1.4, can be found on our download page. May 4, 2011: LimitCPU 1.3 is now ready for download. This new release cleans up the documentation, clarifies the license and includes a copy of the Debian manual page. The new version can be found on our download page. April 27, 2011: I am happy to report the first release of LimitCPU, version 1.2, is now ready for download. This version is essentially CPUlimit 1.1, but with patches from Debian and Ubuntu applied. A changelog and README file have been added to the source tree, along with a formal license file and some improvements based on the port from FreeBSD. Please see our download page for a copy of the new release. |