T
T
Teo142020-05-10 12:37:45
Debian
Teo14, 2020-05-10 12:37:45

How to limit traffic without sudo?

There is a server on Debian, a torrent client is constantly running for downloading and a script moving downloads to a remote storage, and the client and script are running with user rights. The place on the disk is not rubber, and given the asynchrony of the channel, the disk clogs up very quickly, because. the script does not have time to pump out the downloaded. I want to monitor the size of the directory with downloaded files and, when it reaches a value above a certain one, cut the throughput on the incoming channel to conditional 1mbs. And when the directory size returns to acceptable values, remove the restrictions.
User rights, no sudo.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
GavriKos, 2020-05-10
@GavriKos

Isn't it easier to limit the speed in the torrent downloader itself? The same transmission has quite an API for working with such things, which works without any sudo

P
pfg21, 2020-05-10
@pfg21

channel shaping is not a user level.
write a script to change the shaping parameters and write permission for this script to run it as root in /etc/sudoers.d
or set a suid bit on the executable file

C
CityCat4, 2020-05-10
@CityCat4

cut bandwidth on the incoming channel

By definition, the user cannot do this, because this is an admin function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question