Solved

Linux command question (ulimit)

Posted on 2006-10-22
6
564 Views
Last Modified: 2008-03-06
I am running a bittorrent program and am getting the error that too many files are open.
I have to increase the number (default 1024) to about 10,000 or so.

I am running Fedora Cora 5 and Gnome.

I open a terminal (Applications -> Accessories - > Terminal)
I read the man page on ulimit.

I type 'ulimit -a' and see that the current is indeed 1024 open files.
I try 'ulimit -n 10000' and then 'ulimit -a' again and it has changed.
But my bittorrent program doesn't seem to think so, and more obvious is the fact, that when I close the terminal and then reopen another one I type 'ulimit -a' and the # of open files options is back  at '1024'

How can I make this change permanent?

What is the difference between hard and soft in ulimit?

thanks
david
0
Comment
Question by:davidgareau
6 Comments
 

Accepted Solution

by:
joeyosu earned 250 total points
ID: 17784123
You need to add the line to your .bash_profile. (i believe adding it to .bashrc might work as well.)  Then log out and log back in.  This should make the setting each time you log in.  Just doing it the way you did would tie it to only that single terminal window.

Hope that helps.
-Joey
0
 
LVL 84

Expert Comment

by:ozo
ID: 17784133
when you set ulimit only applies to the process you are running under Applications -> Accessories - > Terminal, and its child processes
if you close the terminal and then reopen another one, that is a different process
can you start the bittorrent program from your shell under Applications -> Accessories - > Terminal after you set ulimit?
and there may still be a system limit beyond the process limit
0
 
LVL 4

Assisted Solution

by:chhokra_expert
chhokra_expert earned 250 total points
ID: 17845779
if you don't want to change ulimit for your profile or system-wide, i suggest creating a shell-script for doing this. e.g.
#------ start copying here ------
#!/bin/sh
#launch_bittorrent

ulimit -f unlimited
bittorrent &

#----- end copying here -------

you may want to replace the "bittorrent" command with the actual command (path to executable + parameters if any). this should launch only bittorrent with the unlimited file setting

hth,
kg
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now