Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux command question (ulimit)

Posted on 2006-10-22
6
Medium Priority
?
608 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 1000 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 85

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 1000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
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.

916 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