LinuxQuestions.org
Help answer threads with 0 replies.
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-23-2016, 12:12 AM   #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 09:04 PM.
 
Old 01-23-2016, 01: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, 04:02 AM   #3
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
deleted

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

Original Poster
Rep: Reputation: 3
deleted

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

Rep: Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005
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, 07: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, 09:44 PM   #7
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
deleted

Last edited by sub320; 01-26-2016 at 09:04 PM.
 
Old 01-24-2016, 11: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, 01:12 AM   #9
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
deleted

Last edited by sub320; 01-26-2016 at 09:16 PM.
 
Old 01-25-2016, 09: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


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

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

All times are GMT -5. The time now is 09:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration