在使用群辉大量下载时遇到Too many open files问题,查阅相关资料后发现tr的limit数是写死的。这里使用C程序动态修改tr的limit数。
1.创建一个limit.C源文件并输入如下代码
#include <stdio.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/types.h>
int main(int argc, char** argv) {
pid_t pid;
struct rlimit new_limit;
int result;
if (argc < 2) {
return 1;
}
pid = atoi(argv[1]);
new_limit.rlim_cur = 60000;
new_limit.rlim_max = 60000;
result = prlimit(pid, RLIMIT_NOFILE, &new_limit, NULL);
return result;
}
2.编译程序
使用安装好的GCC编译器编译程序,/opt/bin/gcc limit.c -o limit
3.运行程序修改tr limit 数量
先获取tr的pidps -ef | grep transmission
然后使用./limit 刚刚获取的pid
修改tr的limit数量即可。
%%
I'm no longer positive the place you're getting your information, however
good topic. I must spend a while studying more or
figuring out more. Thank you for wonderful information I was looking for this information for my mission.
This is very interesting, You are a very skilled blogger. I've joined your feed and look forward to seeking more of your fantastic post.
Also, I've shared your site in my social networks!
Have you ever considered writing an e-book or guest authoring on other
websites? I have a blog centered on the same ideas you discuss
and would really like to have you share some stories/information. I know my viewers would value your work.
If you're even remotely interested, feel free to send me an e-mail.
What's up, yeah this piece of writing is genuinely good and
I have learned lot of things from it concerning blogging.
thanks.
https://promobanger.com/
%%
По этой причине даже квалифицированный специалист не способен точно ответить, сколько стоит капитальный ремонт двигателя без предварительной разборки и дефектовки мотора http://dmalmotors.ru/zamena-masel-i-filtrov.html
Также зачастую не удается на начальном этапе определить и полный список запчастей для капитального ремонта двигателя http://dmalmotors.ru/remont-sistemy-okhlazhdeniya.html
Все будет зависеть от износа, характера возможных повреждений и других факторов http://dmalmotors.ru
Также не следует забывать и о том, что капремонт может потребоваться не только и узлам, которые расположены в нем, но и с установленным в головке блока http://dmalmotors.ru/remont-starterov.html
Разработанные инженерами конструкции двигателей позволили создать надежные и неприхотливые в эксплуатации агрегаты http://dmalmotors.ru/zamena-i-remont-stsepleniya.html
Они имеют значительный срок службы и при правильной эксплуатации не требуют серьезного вмешательства для ремонта http://dmalmotors.ru/remont-sistemy-okhlazhdeniya.html
Каждый производитель закладывает определенный ресурс агрегата до капитального ремонта http://dmalmotors.ru/zamena-tsepi-ili-remnya-grm.html
В среднем, показатель составляет около 150-200 тыс http://dmalmotors.ru/remont-generatorov.html
км http://dmalmotors.ru/zamena-tsepi-ili-remnya-grm.html
пробега http://dmalmotors.ru/remont-sistemy-okhlazhdeniya.html
Указанный капитальный ремонт двигателя автомобиля приводится применительно к современным ТС, которые зачастую оснащаются малообъемными или среднеобъемными силовыми агрегатами http://dmalmotors.ru/remont-avtoelektriki.html
Добавим, что забитые фильтры не только могут пропускать грязь внутрь двигателя, но и заметно влияют на состав топливно-воздушной смеси в современных двигателях с инжектором http://dmalmotors.ru/zamena-masel-i-filtrov.html
В этом случае ухудшается качество распыла топлива, падает мощность ДВС, возникают локальные перегревы http://dmalmotors.ru/zamena-i-remont-stsepleniya.html
Сюда же можно отнести и езду на горючем низкого качества или с несоответствующим октановым/цетановым числом, так как детонация способна быстро разрушить ранее исправный мотор http://dmalmotors.ru/promyvka-inzhektorov.html
Для того чтобы избежать прогара или оплавления поршней, прогара клапанов и других неприятностей нужно не только менять фильтры и масло по регламенту, но и заливать качественное топливо, а также периодически чистить инжектор каждые 30-40 тыс http://dmalmotors.ru
км http://dmalmotors.ru/zamena-i-remont-stsepleniya.html
[url=http://colchicine.works/]colchicine[/url]
Hi there to every body, it's my first go to see of this website; this webpage carries amazing and truly good
information in favor of readers.
%%
I do consider all of the ideas you have offered for your post.
They're really convincing and will certainly work.
Still, the posts are very short for novices. May just you please
prolong them a bit from subsequent time? Thanks for the post.
%%
Thanks to my father who stated to me concerning this webpage, this blog is really awesome.
For newest news you have to go to see web and on the web I found this web site as a most excellent site for most recent updates.
[url=http://albendazole.boutique/]albenza 400 mg[/url]
%%
Wonderful blog you have here but I was wondering
if you knew of any discussion boards that cover the same topics talked about here?
I'd really like to be a part of online community where I can get comments
from other knowledgeable individuals that share the same interest.
If you have any recommendations, please let me know.
Kudos!
%%
%%