Advertisement

03.07.2008 at 03:37PM PST, ID: 23224411
[x]
Attachment Details

Making ulimit default value permanent without calling ulimit

Asked by RamusNee in Linux Administration, Ubuntu

Tags: Ubuntu, Linux, 2.6.22-14-generic #1 SMP i686 GNU/Linux, Ubuntu Gutsy

I modified /etc/security/limits.conf. I can manually raise the number of file descriptors using ulimit -n. I can put that command in /etc/profile or similar.

How can I avoid /etc/profile or similar shell modifications and just have ulimit -n show the right limit from the start?

# fgrep nofile /etc/security/limits.conf
*                -       nofile          16384

# egrep '__FD_SETSIZE.*16384' /usr/include/*/*h
/usr/include/bits/typesizes.h:#define   __FD_SETSIZE            16384
/usr/include/linux/posix_types.h:#define __FD_SETSIZE   16384

# fgrep pam_limits /etc/pam.d/*
/etc/pam.d/atd:session    required   pam_limits.so
/etc/pam.d/cron:session    required   pam_limits.so
/etc/pam.d/login:session    required   pam_limits.so
/etc/pam.d/login:session    required   /lib/security/pam_limits.so
/etc/pam.d/ssh:session    required     pam_limits.so
/etc/pam.d/ssh:session    required   /lib/security/pam_limits.so
/etc/pam.d/su:session    required   pam_limits.so

# uname -a
Linux clt 2.6.22-14-generic #1 SMP Tue Feb 12 07:00:00 UTC 2008 i686 GNU/Linux

The first two changes above were enough to raise the limit permanently on Ubuntu Dapper, but I cannot find a way to do that (without shell)  on Gutsy.

I login as root via ssh, but that should not matter.

Thank you.
Start Free Trial
[+][-]03.10.2008 at 02:27AM PDT, ID: 21084950

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.10.2008 at 07:29AM PDT, ID: 21086642

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux Administration, Ubuntu
Tags: Ubuntu, Linux, 2.6.22-14-generic #1 SMP i686 GNU/Linux, Ubuntu Gutsy
Sign Up Now!
Solution Provided By: RamusNee
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.10.2008 at 01:06PM PDT, ID: 21089901

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.10.2008 at 01:22PM PDT, ID: 21090021

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.11.2008 at 05:28PM PDT, ID: 21101920

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628