LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2013, 06:03 PM   #1
submerge
LQ Newbie
 
Registered: May 2013
Posts: 3

Rep: Reputation: Disabled
Setting open files for a process


Hi I'm trying to configure init and xinetd for files. I have tried /etc/security/limits.conf but the issue with this approach, is that it doesn't cover processes started by either init or xinetd. For instance, if the process is started during server boot it does not use what is in /etc/security/limits.conf.

Any assistance would be appreciate.
 
Old 06-01-2013, 03:57 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,358
Blog Entries: 55

Rep: Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545
Quote:
Originally Posted by submerge View Post
Hi I'm trying to configure init and xinetd for files. I have tried /etc/security/limits.conf but the issue with this approach, is that it doesn't cover processes started by either init or xinetd. For instance, if the process is started during server boot it does not use what is in /etc/security/limits.conf.
/etc/security/limits.conf is a part of PAM. Services and users settings ulimits apply to will have a PAM stack in /etc/pam.d/ invoking the PAM "limits" module (as in see for yourself with 'grep -r'). With Xinetd however you shouldn't need to use ulimit as 'man xinetd.conf' tells you to use "rlimit_files". For init the maximum open files is a sysctl as in 'sysctl -w fs.file-max=[someValue]': also see /etc/sysctl.conf and 'man sysctl'.

Last edited by unSpawn; 06-01-2013 at 03:58 AM. Reason: //More *is* more.
 
Old 06-02-2013, 02:15 PM   #3
submerge
LQ Newbie
 
Registered: May 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
unSpawn thank you so much for responding. I will take note of your advice and keep my fingers crossed.
 
Old 06-03-2013, 11:10 AM   #4
submerge
LQ Newbie
 
Registered: May 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Well...I still didn't achieve my quest.

We have some processes that need the max open files for a process set higher than the OS default of 1024. We have set it in /etc/security/limits.conf to handle normal log on sessions but we have a process that starts on boot and another from xinetd that need the limits set higher as well.

On the RHEL5 systems in question, I don't see "rlimit_files" in the xinetd.conf man page and putting it in the appropriate /etc/xeintd.d conf file resulted in an error:
Jun 3 09:42:03 nldglab-23 [daemon.warn<28>] xinetd[22288]: bad service attribute: rlimit_files [file=/etc/xinetd.d/pblocald] [line=12]
This seems to be new to RHEL6.

My understanding is that fs.file-max is a system wide open file max and not a per user/process setting so that isn't what we want.

Basically I am looking for where to set the maximum number of open file descriptors for all processes whether started from init (server boot), xinetd or a login shell.
 
Old 06-03-2013, 12:29 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,358
Blog Entries: 55

Rep: Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545
Quote:
Originally Posted by submerge View Post
On the RHEL5 systems in question, I don't see "rlimit_files" in the xinetd.conf man page and putting it in the appropriate /etc/xeintd.d conf file resulted in an error:
Jun 3 09:42:03 nldglab-23 [daemon.warn<28>] xinetd[22288]: bad service attribute: rlimit_files [file=/etc/xinetd.d/pblocald] [line=12]
This seems to be new to RHEL6.
No, it's definitely in RHEL 5.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nagios plugin for monitoring the no. of open files for a particular process sarathveera Linux - Software 1 02-05-2010 12:43 AM
LXer: Linux Process Management: Using lsof to List Open Files LXer Syndicated Linux News 0 04-10-2009 07:20 AM
Setting timeout for a process aravindtj Linux - Newbie 4 09-05-2006 02:06 AM
Setting ulimit to increase # of open files dieyouspammer Slackware 6 02-01-2006 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration