All Projects → lowleveldesign → Process Governor

lowleveldesign / Process Governor

Licence: mit
This application allows you to put various limits on a Windows process.

Projects that are alternatives of or similar to Process Governor

Easydeviceinfo
📱 [Android Library] Get device information in a super easy way.
Stars: ✭ 1,698 (+793.68%)
Mutual labels:  memory
Jupiter
A Windows virtual memory editing library with support for pattern scanning.
Stars: ✭ 156 (-17.89%)
Mutual labels:  memory
Mysql Magic
dump mysql client password from memory
Stars: ✭ 183 (-3.68%)
Mutual labels:  memory
Osvvm
OSVVM Utility Library: AlertLogPkg, CoveragePkg, RandomPkg, ScoreboardGenericPkg, MemoryPkg, TbUtilPkg, TranscriptPkg, ...
Stars: ✭ 140 (-26.32%)
Mutual labels:  memory
Sysstat
Performance monitoring tools for Linux
Stars: ✭ 2,055 (+981.58%)
Mutual labels:  memory
Memguard
Secure software enclave for storage of sensitive information in memory.
Stars: ✭ 2,036 (+971.58%)
Mutual labels:  memory
Ed4
Computational Cognitive Neuroscience, Fourth Edition
Stars: ✭ 133 (-30%)
Mutual labels:  memory
Mems
Utils for viewing memory in Swift.
Stars: ✭ 187 (-1.58%)
Mutual labels:  memory
Dejavu
Quickly detect already witnessed data.
Stars: ✭ 151 (-20.53%)
Mutual labels:  memory
Unityheapexplorer
A Memory Profiler, Debugger and Analyzer for Unity 2019.3 and newer.
Stars: ✭ 179 (-5.79%)
Mutual labels:  memory
Touch Bar Istats
Show CPU/GPU/MEM temperature on Touch Bar with BetterTouchTool!
Stars: ✭ 141 (-25.79%)
Mutual labels:  memory
Memflow
physical memory introspection framework
Stars: ✭ 149 (-21.58%)
Mutual labels:  memory
Threejs Sandbox
Set of experiments and extensions to THREE.js.
Stars: ✭ 163 (-14.21%)
Mutual labels:  memory
Mmat
An automatically testing and analysis hprof library for android app (自动分析Android内存泄漏)
Stars: ✭ 137 (-27.89%)
Mutual labels:  memory
Loli profiler
Memory instrumentation tool for android app&game developers.
Stars: ✭ 179 (-5.79%)
Mutual labels:  memory
Perf Tools
⏱→ 🚀A set of tools for improving performance your application (balancer, performance, PerfKeeper, LazyPromise).
Stars: ✭ 135 (-28.95%)
Mutual labels:  memory
Mtuner
MTuner is a C/C++ memory profiler and memory leak finder for Windows, PlayStation 4 and 3, Android and other platforms
Stars: ✭ 2,007 (+956.32%)
Mutual labels:  memory
Ios Monitor Platform
📚 iOS 性能监控 SDK —— Wedjat(华狄特)开发过程的调研和整理
Stars: ✭ 2,316 (+1118.95%)
Mutual labels:  memory
Wgcloud
linux运维监控工具,支持系统信息,内存,cpu,温度,磁盘空间及IO,硬盘smart,系统负载,网络流量等监控,API接口,大屏展示,拓扑图,进程监控,端口监控,docker监控,文件防篡改,日志监控,数据可视化,web ssh,堡垒机,指令下发批量执行,linux面板,探针,故障告警
Stars: ✭ 2,669 (+1304.74%)
Mutual labels:  memory
Redis Rdb Cli
Redis rdb CLI : A CLI tool that can parse, filter, split, merge rdb and analyze memory usage offline. It can also sync 2 redis data and allow user define there own sink service to migrate redis data to somewhere.
Stars: ✭ 176 (-7.37%)
Mutual labels:  memory

Process Governor

This application allows you to set constraints on a process. It uses a job object for this purpose. The available options are:

Usage: procgov [OPTIONS] args

Options:
  -m, --maxmem=VALUE         Max committed memory usage in bytes (accepted
                               suffixes: K, M or G).
      --maxws=VALUE          Max working set size in bytes (accepted
                               suffixes: K, M, or G). Must be set with minws.
      --minws=VALUE          Min working set size in bytes (accepted
                               suffixes: K, M, or G). Must be set with maxws.
      --env=VALUE            A text file with environment variables (each
                               line in form: VAR=VAL). Applies only to newly
                               created processes.
  -n, --node=VALUE           The preferred NUMA node for the process.
  -c, --cpu=VALUE            If in hex (starts with 0x) it is treated as an
                               affinity mask, otherwise it is a number of CPU
                               cores assigned to your app. If you also provide
                               the NUMA node, this setting will apply only to
                               this node.
  -e, --cpurate=VALUE        The maximum CPU rate in % for the process. If
                               you also set the affinity, the rate will apply
                               only to the selected CPU cores. (Windows 8.1+) 
      --bandwidth=VALUE      The maximum bandwidth (in bytes) for the process
                               outgoing network traffic (accepted suffixes: K,
                               M, or G). (Windows 10+)
  -r, --recursive            Apply limits to child processes too (will wait
                               for all processes to finish).
      --newconsole           Start the process in a new console window.
      --nogui                Hide Process Governor console window (set always
                               when installed as debugger).
  -p, --pid=VALUE            Attach to an already running process
      --install              Install procgov as a debugger for a specific
                               process using Image File Executions. DO NOT USE
                               this option if the process you want to control
                               starts child instances of itself (for example,
                               Chrome).
  -t, --timeout=VALUE        Kill the process (with -r, also all its
                               children) if it does not finish within the
                               specified time. Add suffix to define the time
                               unit. Valid suffixes are: ms, s, m, h.
      --process-utime=VALUE  Kill the process (with -r, also applies to its
                               children) if it exceeds the given user-mode
                               execution time. Add suffix to define the time
                               unit. Valid suffixes are: ms, s, m, h.
      --job-utime=VALUE      Kill the process (with -r, also all its
                               children) if the total user-mode execution time
                               exceed the specified value. Add suffix to define
                               the time unit. Valid suffixes are: ms, s, m, h.
      --uninstall            Uninstall procgov for a specific process.
      --debugger             Internal - do not use.
  -q, --quiet                Do not show procgov messages.
  -v, --verbose              Show verbose messages in the console.
  -h, --help                 Show this message and exit
  -?                         Show this message and exit

Procgov requires .NET 4.6.2 to run.

REMEMBER to always use procgov with the same bitness as your application.

You may set limits on a newly created process or on an already running one. To attach to a process use the -p|--pid switch, eg. procgov --maxmem 40M --pid 1234. To start a new process with the limits applied, just pass the process image path and its arguments as procgov arguments, eg. procgov --maxmem 40M c:\temp\test.exe arg1 arg2".

Finally, it is possible to run procgov always when a given process starts. When you use the --install switch Process Governor will add a special key to the Image File Execution Options in the registry, so that it will always start before your chosen process. To install Process Governor for a test.exe process, use the following command: procgov --install --maxmem 40M test.exe. You may later remove this installation by using the --uninstall switch, eg. procgov --uninstall test.exe.

Limit memory of a process

With the --maxmem switch Process Governor allows you to set a limit on a memory committed by a process. On Windows committed memory is actually all private memory that the process uses. This way you may use Process Governor to test your .NET applications (including web applications) for memory leaks. If the process is leaking memory you faster get the OutOfMemoryException.

With the --maxws and --minws switches you may control the maximum and minimum working set sizes of the process. If --maxws is > 0, --minws must also be > 0, and vice-versa.

Limit CPU usage of a process (CPU affinity)

With the --cpu switch you may control on which cores your application will run. If you provide the CPU core number as a decimal value, your application will be allowed to use the specified number of cores. If you provide the CPU core number as a hex value (with 0x prefix), this number will be treated as an affinity mask - where each bit represents a CPU core (starting from the least significant bit). Let's have a look at two example usages on a CPU intensive application. In a first one we set the CPU core limit to two cores:

> procgov --cpu=2 TestLimit.exe

A CPU usage graph on my machine looks as follows:

cpu-equals-2

In a second we set the CPU affinity mask (with the hex notation):

> procgov --cpu=0x2 TestLimit.exe

A CPU graph in this case looks as follows (notice only the second core is used):

cpu-equals-0x2

Limit the CPU rate

The --cpu-rate option allows you to set the maximum CPU rate for the process. If you also set the CPU affinity, the rate will apply only to the selected cores. For example, if you have eight logical CPU cores on your machine and you set the CPU rate to 100% and the CPU affinity to 0x7 (first four cores), the maximum CPU rate reported for this process by the monitoring tools will be 50% (we are running at full capacity but on a half of the CPU number).

Limit the execution time of the process (clock time)

With the --timeout option you may define the maximum time (clock time) the process can run before procgov terminates it. If the --recursive option is set and the timeout passes, progov will terminate also all the process children started from the beginning of the monitoring session.

Limit the user-mode execution time

The --process-utime and --job-utime options allow you to set a limit on the maximum user-mode execution time for a process (with the --recursive option also all its children) or a job. The latter case will make sense with the --recursive option as it will set a limit on the total user-mode execution time for the process and its children.

Set additional environment variables for a process

With the --env switch you may provide a file with additional environment variables, which should be set for a process. An example usage (provided by @weidingerhp) is to set the COR PROFILING variables:

COR_ENABLE_PROFILING=0x01
COR_PROFILER={32E2F4DA-1BEA-47ea-88F9-C5DAF691C94A}

Contributions

Below you may find a list of people who contributed to this project. Thank you!

  • @rowandh - an issue with the WS limit not being set
  • @beevvy - an issue report and a fix for a bug with the environment variables
  • @weidingerhp - an idea of environment variables for a process and CLR profiler setup

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].