LinuxCommandLibrary

runlim

A tool for sampling and limiting time and memory usage of a program and its child processes using the proc file system on Linux.

TLDR

Print the time and memory usage of a command

$ runlim [command] [command_arguments]
copy


Log statistics to a file instead of stdout
$ runlim --output-file=[path/to/file] [command] [command_arguments]
copy


Limit time to an upper bound (in seconds)
$ runlim --time-limit=[number] [command] [command_arguments]
copy


Limit real-time to an upper bound (in seconds)
$ runlim --real-time-limit=[number] [command] [command_arguments]
copy


Limit space to an upper bound (in MB)
$ runlim --space-limit=[number] [command] [command_arguments]
copy

SYNOPSIS

runlim [ options ...] command [ arguments ...]

DESCRIPTION

run is a tool that can be used to run and control benchmarks. It executes a given command with (optional) arguments, samples resource usage during the run, and kills the process (and its child processes) if a certain time and/or space limit is exhausted.

Every 100 milliseconds, runlim takes a sample of the program's resource utilization, and logs status information to stderr every second. Optionally, the status can be logged to a file.

Multi-threaded programs can be limited by setting a wall clock timeout. runlim follows the time accumulation scheme of GNU time for multi-threaded programs and programs that spawn multiple child-processes: time spent in each thread/child is summed up, unless you are only interested in walk clock time.

OPTIONS

runlim accepts the following options:

-h, --help

Show summary of options.

--version

Show version of program.

-o FILE, --output-file=FILE

Overwrite or create FILE for output logging.

-s NUM, --space-limit=NUM

Set space limit to NUM megabytes.

-t NUM, --time-limit=NUM

Set time limit to NUM seconds.

-r NUM, --real-time-limit=NUM

Set real time limit to NUM seconds.

-k, --kill

Propagate signals.

SEE ALSO

time(1), timelimit(1), timeout(1), time(7).

AUTHOR

runlim was written by Armin Biere and Toni Jussila.

This manual page was written by Thomas Krennwallner <tkren@kr.tuwien.ac.at>, for the Debian project (and may be used by others).

Copied to clipboard