Solved

Linux command question (ulimit)

Posted on 2006-10-22
6
569 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
#Citrix #POC #XenDesktop #vCenter #VMware #ESX
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

808 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