LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-22-2016, 11:12 PM   #1
sub320
Member
 
Registered: Jan 2016
Posts: 116

Rep: Reputation: 3
change setting but return to original


deleted

Last edited by sub320; 01-26-2016 at 08:04 PM.
 
Old 01-23-2016, 12:40 AM   #2
Combinare
LQ Newbie
 
Registered: Jan 2016
Posts: 4

Rep: Reputation: Disabled
The ulimit command only sets the limit for the duration of that login session. To make the change permanent, you will need to update the configuration file that controls default limits on your system. On most distributions, the file is /etc/security/limits.conf. You can run "man limits.conf" to get more information on the format of the file and how to configure permanent limit changes.
 
Old 01-23-2016, 03:02 AM   #3
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
deleted

Last edited by sub320; 01-26-2016 at 08:04 PM.
 
Old 01-24-2016, 01:32 AM   #4
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
deleted

Last edited by sub320; 01-26-2016 at 08:04 PM.
 
Old 01-24-2016, 05:19 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sub320 View Post
Thanks reply ,
I would like to confirm what I need to do is add the following two lines to /etc/security/limits.conf , is it right ? if yes , I have to restart the server after update it , what can I do if I don't want to restart server ?
Code:
*               hard    nofile          65535
*               soft    nofile          4096
...and, less than 24 hours later:
Quote:
Originally Posted by sub320
May I know if I have to restart the server after add this line ?
Don't bump your own thread, unless you have new information to add...read the LQ Rules, Question Guidelines, and How to ask a smart question links.

Your question was answered very clearly in post #2...running that command sets it for THAT login session only. To set it system wide, you edit the file, and REBOOT. You were pointed to a man page for that file...did you read it?

And what you can do if you don't want to restart the server, is set the limit manually, and run whatever process you want from that session. That is your only option.
 
Old 01-24-2016, 06:17 PM   #6
Combinare
LQ Newbie
 
Registered: Jan 2016
Posts: 4

Rep: Reputation: Disabled
The lines you have posted appear to be correct.

However, as far as I know, you do NOT need to reboot the server. You *will* need to log out and back in, however, for the settings to take effect.

If you are changing the limits for a process that starts on boot, you will need to restart the service.
 
Old 01-24-2016, 08:44 PM   #7
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
deleted

Last edited by sub320; 01-26-2016 at 08:04 PM.
 
Old 01-24-2016, 10:38 PM   #8
Combinare
LQ Newbie
 
Registered: Jan 2016
Posts: 4

Rep: Reputation: Disabled
Correct: the limits.conf file is read by PAM (pam_limits.so) when the user logs in. You do not need to reboot the server for the configuration change to take effect on an interactive user session - the user simply needs to log out and back in.

If you are trying to change the limits in effect for a daemon/service process (for example, if you are trying to increase the limits for the mysqld service processes), you will need to stop and restart the service after making the configuration change.
 
Old 01-25-2016, 12:12 AM   #9
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
deleted

Last edited by sub320; 01-26-2016 at 08:16 PM.
 
Old 01-25-2016, 08:19 AM   #10
Combinare
LQ Newbie
 
Registered: Jan 2016
Posts: 4

Rep: Reputation: Disabled
This is documented in the man page for limits.conf:

Quote:
All items support the values -1, unlimited or infinity indicating no limit, except for priority and nice.
 
  


Reply



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
[SOLVED] gnome desktop...how to change it back to the original style doughyi8u Linux - Desktop 4 05-02-2015 10:22 AM
is it possible to deny root2 to change password of original root Winanjaya Linux - Newbie 11 08-06-2010 07:13 AM
how to make a bootable cd/dvd to prevent change any content from original? hocheetiong Linux - Newbie 2 01-14-2009 11:39 PM
Problem with permissions reverting to original setting preacherman481 Linux - General 1 03-30-2005 09:14 AM
Change root pw, i know the original one mopron Linux - General 2 04-22-2002 09:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:41 PM.

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
Open Source Consulting | Domain Registration