在使用群辉大量下载时遇到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数量即可。
cheap generic levitra india: buy generic viagra india - cheap levitra india
http://canadianph.pro/# canadian pharmacy meds
canadian drugstore online [url=https://canadianph.pro/#]vipps approved canadian online pharmacy[/url] best rated canadian pharmacy
dark market url dark web markets
dark market 2023 darknet drug links
When someone writes an post he/she keeps the thought of a user in his/her mind that how a user
can understand it. Thus that's why this piece of
writing is great. Thanks!
[url=https://happyfamilystore.sbs/]safe canadian pharmacy[/url]
darknet drug market tor markets
Thank you a bunch for sharing this with all people you actually know what you are
talking about! Bookmarked. Kindly also discuss with my web site =).
We could have a link change agreement between us!
Greetings! Very helpful advice within this article! It's the little
changes that make the most significant changes. Many thanks for sharing!
Good day! I know this is kinda off topic but I was wondering if you knew where I could find a
captcha plugin for my comment form? I'm using the
same blog platform as yours and I'm having problems finding one?
Thanks a lot!
%%
Hi there i am kavin, its my first occasion to commenting
anyplace, when i read this post i thought i could also
create comment due to this sensible article.
What's up everybody, here every person is sharing such knowledge, so it's
fastidious to read this blog, and I used to visit this website all the time.
I enjoy what you guys are up too. This kind of clever work and exposure!
Keep upp the good works guys I've incorporated you guys to myy blogroll.
회사소개서PPT
%%
They accompany them with a score tatraindia.com, which will then be used to calculate the ranking.
%%
%%
%%
Pretty! This was a really wonderful post. Thanks for providing
this information.
Excellent blog right here! Additionally your website lots up fast!
What host are you the usage of? Can I am getting your affiliate link in your host?
I desire my site loaded up as quickly as yours lol