NAME

throttle - Bandwidth limiting pipe

VERSION

This document describes version 0.003 of throttle (from Perl distribution App-throttle), released on 2019-07-22.

SYNOPSIS

DESCRIPTION

This utility copies standard input to standard output while limiting bandwidth to the specified maximum. Bandwidth limiting is done by calling nanosleep() in between copying.

Keywords: throttle, throughput, bandwidth, speed limit, stdin, stdout, standard input, standard output, pipe.

For higher throughput speeds, the overhead of this Perl-based utility will become more significant. you might want to try C-based implementations mentioned in "SEE ALSO".

OPTIONS

--help, -h, -?

--version, -v

--block-size, -b

The default is to use at least 4096 (4KB) or its multiples to keep the sleeping period close to 1 second (unless speed limit is too low, in which case block will also be reduced accordingly).

--speed, -s

Default: undefined (unlimited).

Accepted units:

  • bps (bits per second)

  • Bps, B/s (bytes per second)

  • kbps, kbit (kilobits per second)

  • KB/s (kilobytes per second)

  • Mbps, Mbit (megabits per second)

  • MB/s (megabytes per second)

Examples: 19200 bps, 1.5Mbit, 0.5MB/s.

ENVIRONMENT

DEBUG

Bool. If set will output more debug messages to stderr.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-throttle.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-throttle.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-throttle

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

throttle, http://www.pro-toolz.net/data/man/1/throttle.html, bandwidth limiting pipe. The closest in purpose/form with our Perl-based throttle. At the time of this writing, no Debian/Ubuntu package is available. Differences: our Perl-based throttle allows specifying bandwidth limit in a more human-friendly way (-s 1Mbps instead of -m 1).

cpipe, http://cpipe.berlios.de, a CLI to copy stdin to stdout while counting bytes and reporting progress to stderr. Can also be instructed to limit throughput, although the minimum speed is 1KB/s and minimum buffer size is 1KB. At the time of this writing, Debian/Ubuntu package is available.

pv (pipe viewer), http://www.ivarch.com/programs/pv.shtml, monitor the progress of data through a pipe. Like cpipe, except it doesn't have an option to limit speed. At the time of this writing, Debian/Ubuntu package is available.

socat, http://www.dest-unreach.org/socat, a versatile relay program. Its ispeed and ospeed options cannot be applied to stdin/stdout though, it seems.

throttle-cli, https://github.com/edi9999/throttle-cli, an NPM package. Line-based.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019, 2018 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.