Solved

Linux command question (ulimit)

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

615 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