Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Linux command question (ulimit)

Posted on 2006-10-22
6
Medium Priority
?
603 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 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 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
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.

688 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